azagrebin commented on a change in pull request #7822: [FLINK-11726][network] 
Refactor the creation of ResultPartition and InputGate into NetworkEnvironment
URL: https://github.com/apache/flink/pull/7822#discussion_r278937310
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
 ##########
 @@ -367,50 +366,47 @@ public Task(
 
                final String taskNameWithSubtaskAndId = taskNameWithSubtask + " 
(" + executionId + ')';
 
-               // Produced intermediate result partitions
-               this.producedPartitions = new 
ResultPartition[resultPartitionDeploymentDescriptors.size()];
+               // add metrics for buffers
+               final MetricGroup buffersGroup = 
metrics.getIOMetricGroup().addGroup("buffers");
 
-               int counter = 0;
+               final Optional<MetricGroup> outputGroup, inputGroup;
 
-               for (ResultPartitionDeploymentDescriptor desc: 
resultPartitionDeploymentDescriptors) {
-                       ResultPartitionID partitionId = new 
ResultPartitionID(desc.getPartitionId(), executionId);
-
-                       this.producedPartitions[counter] = new ResultPartition(
-                               taskNameWithSubtaskAndId,
-                               this,
-                               jobId,
-                               partitionId,
-                               desc.getPartitionType(),
-                               desc.getNumberOfSubpartitions(),
-                               desc.getMaxParallelism(),
-                               networkEnvironment.getResultPartitionManager(),
-                               resultPartitionConsumableNotifier,
-                               ioManager,
-                               desc.sendScheduleOrUpdateConsumersMessage());
-
-                       ++counter;
+               // register detailed network metrics, if configured
+               if 
(taskManagerConfig.getConfiguration().getBoolean(TaskManagerOptions.NETWORK_DETAILED_METRICS))
 {
 
 Review comment:
   I meant not to check `NETWORK_DETAILED_METRICS` in Task and always create 
groups. They will just stay empty if `NetworkEnvironment` adds nothing and it 
should not hurt. What do you think?

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