pnowojski commented on a change in pull request #11098: [FLINK-16060][task] 
Implement working StreamMultipleInputProcessor
URL: https://github.com/apache/flink/pull/11098#discussion_r383409342
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/InputSelection.java
 ##########
 @@ -110,6 +110,41 @@ public int fairSelectNextIndexOutOf2(int 
availableInputsMask, int lastReadInputI
                throw new UnsupportedOperationException("Only two inputs are 
supported.");
        }
 
+       /**
+        * Fairly select one of the available inputs for reading.
+        *
+        * @param availableInputsMask The mask of all available inputs.
+        * @param lastReadInputIndex The index of last read input.
+        * @return the index of the input for reading or -1, and -1 indicates 
no input is selected (
+        *         {@code inputMask} is empty or the inputs in {@code 
inputMask} are unavailable).
+        */
+       public int fairSelectNextIndex(int availableInputsMask, int 
lastReadInputIndex) {
 
 Review comment:
   I've forgotten about a TODO in the code to investigate it. I think we should 
be fine by supporting longs. Previously for two input case it was `int`, as  it 
was max 2.

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