pnowojski commented on a change in pull request #11155: 
[FLINK-14818][benchmark] Fix receiving InputGate setup of 
StreamNetworkBenchmarkEnvironment.
URL: https://github.com/apache/flink/pull/11155#discussion_r382445336
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/benchmark/StreamNetworkBenchmarkEnvironment.java
 ##########
 @@ -238,18 +241,19 @@ private InputGate createInputGate(TaskManagerLocation 
senderLocation) throws Exc
 
        private InputGateDeploymentDescriptor 
createInputGateDeploymentDescriptor(
                        TaskManagerLocation senderLocation,
-                       int consumedSubpartitionIndex,
+                       int gateIndex,
                        ResourceID localLocation) {
 
-               final ShuffleDescriptor[] channelDescriptors = 
Arrays.stream(partitionIds)
-                       .map(partitionId ->
-                               createShuffleDescriptor(localMode, partitionId, 
localLocation, senderLocation, consumedSubpartitionIndex))
-                       .toArray(ShuffleDescriptor[]::new);
+               final ShuffleDescriptor[] channelDescriptors = new 
ShuffleDescriptor[channels];
+               for (int channelIndex = 0; channelIndex < channels; 
++channelIndex) {
+                       channelDescriptors[channelIndex] = 
createShuffleDescriptor(
+                               localMode, partitionIds[gateIndex], 
localLocation, senderLocation, gateIndex);
+               }
 
                return new InputGateDeploymentDescriptor(
                        dataSetID,
                        ResultPartitionType.PIPELINED_BOUNDED,
-                       consumedSubpartitionIndex,
+                       0,
 
 Review comment:
   This is always zero, as it's being ignored by `Test***InputChannel` classes, 
right?
   
   If so, maybe add a comment explaining that?

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