1996fanrui commented on PR #21690: URL: https://github.com/apache/flink/pull/21690#issuecomment-1384851783
Hi @lindong28 , thanks a lot for your review and discuss here. > Could you explain what is the benefit for this refactor? As I understand, there are two reasons for adding `canEmitBatchOfRecords` to `DataOutput`: - `DataOutput` is responsible for emitting data/watermark/latency, and `canEmitBatchOfRecords` let caller know whether the `emit` can be called repeatedly, so it's related to the `emit`. - The `canEmitBatchOfRecords` may be called in any emit place, such as: `SourceOperator` and `NetworkInput`, if we add `canEmitBatchOfRecords` in `DataOutput`, it's very helpful for code reuse. You can see the last commit of #21697 , I have made an improvement of `NetworkInput`. The `DataOutput#canEmitBatchOfRecords` is easy to reuse. Please correct me if I'm wrong, thanks~ cc @pnowojski -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org