You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/09/02 04:23:32 UTC

[GitHub] [flink] zhijiangW commented on a change in pull request #9483: [FLINK-13767][task] Migrate isFinished method from AvailabilityListener to AsyncDataInput

zhijiangW commented on a change in pull request #9483: [FLINK-13767][task] Migrate isFinished method from AvailabilityListener to AsyncDataInput
URL: https://github.com/apache/flink/pull/9483#discussion_r319802761
 
 

 ##########
 File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputSelectableProcessor.java
 ##########
 @@ -194,23 +193,28 @@ public boolean processInput() throws Exception {
 
 		int readingInputIndex = selectNextReadingInputIndex();
 		if (readingInputIndex == -1) {
-			return false;
+			return InputStatus.NOTHING_AVAILABLE;
 		}
 		lastReadInputIndex = readingInputIndex;
 
 		InputStatus status;
 		if (readingInputIndex == 0) {
 			status = input1.emitNext(output1);
+			firstInputStatus = status;
 		} else {
 			status = input2.emitNext(output2);
+			secondInputStatus = status;
 		}
 		checkFinished(status, lastReadInputIndex);
 
 		if (status == InputStatus.NOTHING_AVAILABLE) {
 			inputSelectionHandler.setUnavailableInput(readingInputIndex);
 		}
 
-		return status == InputStatus.MORE_AVAILABLE;
+		if (status == InputStatus.END_OF_INPUT && secondInputStatus != InputStatus.END_OF_INPUT) {
 
 Review comment:
   Let me think how to make this logic more clearly now.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services