zhijiangW commented on a change in pull request #8191: [FLINK-12213][network]
Pass TaskManagerMetricGroup into constructor of NetworkEnvironment
URL: https://github.com/apache/flink/pull/8191#discussion_r276581786
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java
##########
@@ -357,18 +359,21 @@ public static TaskExecutor startTaskManager(
remoteAddress,
localCommunicationOnly);
+ TaskManagerMetricGroup taskManagerMetricGroup =
MetricUtils.instantiateTaskManagerMetricGroup(
+ metricRegistry,
TaskManagerLocation.getHostName(remoteAddress), resourceID);
+
TaskManagerServices taskManagerServices =
TaskManagerServices.fromConfiguration(
taskManagerServicesConfiguration,
+ taskManagerMetricGroup,
resourceID,
rpcService.getExecutor(), // TODO replace this later
with some dedicated executor for io.
EnvironmentInformation.getSizeOfFreeHeapMemoryWithDefrag(),
EnvironmentInformation.getMaxJvmHeapMemory());
- TaskManagerMetricGroup taskManagerMetricGroup =
MetricUtils.instantiateTaskManagerMetricGroup(
- metricRegistry,
- taskManagerServices.getTaskManagerLocation(),
- taskManagerServices.getNetworkEnvironment(),
-
taskManagerServicesConfiguration.getSystemResourceMetricsProbingInterval());
+ Optional<Time> systemResourceProbeInterval =
ConfigurationUtils.getSystemResourceMetricsProbingInterval(configuration);
Review comment:
It is just for keeping the same behavior as before. In previous
`instantiateTaskManagerMetricGroup`, it first instantiates network metrics and
them instantiates system metrics, so I keep the same sequence.
I would double check whether it is no problem to adjust the sequence. If so
we could avoid this change.
----------------------------------------------------------------
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