zhijiangW commented on a change in pull request #8320: 
[FLINK-12201][network][metrics] Introduce InputGateWithMetrics in Task to 
increment numBytesIn metric
URL: https://github.com/apache/flink/pull/8320#discussion_r281006940
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
 ##########
 @@ -191,7 +191,7 @@
 
        private final ResultPartition[] producedPartitions;
 
-       private final SingleInputGate[] inputGates;
+       private final InputGate[] inputGates;
 
 Review comment:
   I agree with the following refactors for `updatePartitions` and 
`triggerPartitionProducerStateCheck` which could help remove `inputGatesById` 
in task.
   
   But the change of `SingleInputGate[]` to `InputGate[]` is necessary here 
because we have to loop the `SingleInputGate[]` from 
`NetworkEnvironment#createInputGates` to generate `InputGateWithMetrics` which 
implements `InputGate`. The task would finally maintain `InputGate[]` instead 
of `SingleInputGate`, so this change would be consistent with future plans.
   
   Did I misunderstand your concern?

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