lamber-ken commented on issue #6195: [FLINK-9543][METRICS] Expose JobMaster ID 
to metric system
URL: https://github.com/apache/flink/pull/6195#issuecomment-542976828
 
 
   > Closing this PR for now.
   
   Hi, @zentol, maybe it's time to bring up this issue again now. 
   
   We can't distinguish some metrics of jobmanager, because these metrics don't 
contains `ResourceID` like 
`flink_jobmanager_Status_JVM_CPU_Load`、`flink_jobmanager_Status_JVM_CPU_Time` 
and so on.
   
   From `org.apache.flink.runtime.metrics.util.MetricUtils`, we can see that 
missing ResourceID info when init JobManagerMetricGroup.
   ```
   public static JobManagerMetricGroup instantiateJobManagerMetricGroup(
                final MetricRegistry metricRegistry,
                final String hostname) {
        final JobManagerMetricGroup jobManagerMetricGroup = new 
JobManagerMetricGroup(
                metricRegistry,
                hostname);
            ...
   
        return jobManagerMetricGroup;
   }
   
   public static TaskManagerMetricGroup instantiateTaskManagerMetricGroup(
                MetricRegistry metricRegistry,
                TaskManagerLocation taskManagerLocation,
                NetworkEnvironment network) {
        final TaskManagerMetricGroup taskManagerMetricGroup = new 
TaskManagerMetricGroup(
                metricRegistry,
                taskManagerLocation.getHostname(),
                taskManagerLocation.getResourceID().toString());
            ...
   
        return taskManagerMetricGroup;
   }
   ```
   
   
   
   
   
   
   

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