prateekm 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_r272253480
########## File path: samza-core/src/main/java/org/apache/samza/operators/MessageStreamImpl.java ########## @@ -113,18 +114,22 @@ public MessageStreamImpl(StreamApplicationDescriptorImpl streamAppDesc, Operator } @Override - public void sink(SinkFunction<? super M> sinkFn) { +======= +>>>>>>> b22baf9a6b35e5cb0b190be52f8a93cbc9c086cf + 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); Review comment: On second thought, returning new MessageStream will be required to get the correct chaining behavior, such that the next operator runs after this one, not 'in parallel'. Is that right? ---------------------------------------------------------------- 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