sborya commented on a change in pull request #984: Samza 2116: Making sink, sendTo(table), sendTo(stream) non-terminal URL: https://github.com/apache/samza/pull/984#discussion_r271992473
########## File path: samza-core/src/main/java/org/apache/samza/operators/MessageStreamImpl.java ########## @@ -113,18 +113,20 @@ public MessageStreamImpl(StreamApplicationDescriptorImpl streamAppDesc, Operator } @Override - public void sink(SinkFunction<? super M> sinkFn) { + public MessageStream<M> sink(SinkFunction<? super M> sinkFn) { String opId = this.streamAppDesc.getNextOpId(OpCode.SINK); SinkOperatorSpec<M> op = OperatorSpecs.createSinkOperatorSpec(sinkFn, opId); this.operatorSpec.registerNextOperatorSpec(op); + return new MessageStreamImpl<>(this.streamAppDesc, op); } @Override - public void sendTo(OutputStream<M> outputStream) { + public MessageStream<M> sendTo(OutputStream<M> outputStream) { String opId = this.streamAppDesc.getNextOpId(OpCode.SEND_TO); OutputOperatorSpec<M> op = OperatorSpecs.createSendToOperatorSpec( (OutputStreamImpl<M>) outputStream, opId); this.operatorSpec.registerNextOperatorSpec(op); + return new MessageStreamImpl<>(this.streamAppDesc, op); Review comment: return this ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services