sunhaibotb commented on a change in pull request #8731: [FLINK-11878][runtime] 
Implement the runtime handling of BoundedOneInput and BoundedMultiInput
URL: https://github.com/apache/flink/pull/8731#discussion_r294130413
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamInputProcessor.java
 ##########
 @@ -174,6 +179,18 @@ private void initializeNumRecordsIn() {
                }
        }
 
+       private boolean checkFinished() throws Exception {
+               boolean isFinished = input.isFinished();
+               if (isFinished) {
+                       if (streamOperator instanceof BoundedOneInput) {
 
 Review comment:
   If let `xInputProcessor` see non-head operators, we can use the following 
structure. (`OperatorChain` is still invisible to `XInputProcessor`)
   
   ```
   ============== xInputProcessor.java ==============
   
   private boolean checkFinished() throws Exception {
                           ......
       // invoke endInput(...) of the head operator
       ......
      // invoke endInput(...) of other operators
      streamTask.endNonHeadOperatorInputs()
   }
   
   ============== xStreamTask.java ==============
   
   public void endNonHeadOperatorInputs throws Exception {
       operatorChain.endNonHeadOperatorInputs();
   }
   
   ============== OperatorChain.java ==============
   
   public void endNonHeadOperatorInputs throws Exception {
                          ......
   }
   
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to