zhijiangW commented on a change in pull request #8362: [FLINK-11391] Introduce 
shuffle master interface
URL: https://github.com/apache/flink/pull/8362#discussion_r289692905
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
 ##########
 @@ -324,39 +326,39 @@ public void 
setInputChannel(IntermediateResultPartitionID partitionId, InputChan
                }
        }
 
-       public void updateInputChannel(InputChannelDeploymentDescriptor icdd) 
throws IOException, InterruptedException {
+       public void updateInputChannel(
+                       ResourceID localLocation,
+                       PartitionInfo partitionInfo) throws IOException, 
InterruptedException {
                synchronized (requestLock) {
                        if (closeFuture.isDone()) {
                                // There was a race with a task failure/cancel
                                return;
                        }
 
-                       final IntermediateResultPartitionID partitionId = 
icdd.getConsumedPartitionId().getPartitionId();
+                       ShuffleDescriptor shuffleDescriptor = 
partitionInfo.getShuffleDescriptor();
+                       checkArgument(shuffleDescriptor instanceof 
NettyShuffleDescriptor,
 
 Review comment:
   the `checkArgument` and the transformation could be put under the below `if` 
clause, because it is strongly relevant with `if` condition.
   Further, I think it is better to provide 
`PartitionInfo.isLocationTo(consumerLocation)`,  then we could make the check 
and transformation hidden inside `PartitionInfo`, make `updateInputChannel` not 
involve in more details.

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