@Override public Void call() throws Exception { // Send next payload => server is down, should try to reconnect. // We need to send more than just one packet to notice the closed connection. while (retryLatch.getCount() != 0) { sink.invoke("1\n"); } return null; } };
@Override public void run() { try { // need two messages here: send a fin to cancel the client state:FIN_WAIT_2 while the server is CLOSE_WAIT simpleSink.invoke(TEST_MESSAGE + '\n', SinkContextUtil.forTimestamp(0)); } catch (Throwable t) { error.set(t); } } };
simpleSink.invoke(TEST_MESSAGE + '\n', SinkContextUtil.forTimestamp(0));
@Override public void run() { try { SocketClientSink<String> simpleSink = new SocketClientSink<>(host, port, simpleSchema, 0); simpleSink.open(new Configuration()); simpleSink.invoke(TEST_MESSAGE + '\n', SinkContextUtil.forTimestamp(0)); simpleSink.close(); } catch (Throwable t) { error.set(t); } } };
sink.invoke("0\n", SinkContextUtil.forTimestamp(0));
@Override public void invoke(MetricHistogram histo) throws Exception { histo.done(); super.invoke(histo); this.sinkCounter.add(1); this.dateTimeAccumulator.add(formatter.format(new Date(histo.getTimestamp()))); }