pnowojski 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_r293718579
 
 

 ##########
 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:
   Why here are you `endInput` for the head operator and inside the task for 
the rest of the operators? I think you could simplify the code if you iterated 
through all operators in `OperatorChain` (not starting from the second one), 
check each one of them if there are `instanceof BoundedOneInput` and end them 
if they are.
   
   This would work for:
   - OneInputStreamTask - because all of them are/can be `BoundedOneInput`
   - SourceStreamTask - because head will not be `BoundedOneInput`
   - TwoInputStreamTask - because head will not be `BoundedOneInput`

----------------------------------------------------------------
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