[ https://issues.apache.org/jira/browse/FLINK-7876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16233904#comment-16233904 ]
ASF GitHub Bot commented on FLINK-7876: --------------------------------------- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/4872#discussion_r148227334 --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/UnregisteredTaskMetricsGroup.java --- @@ -28,15 +28,15 @@ import org.apache.flink.runtime.metrics.groups.TaskManagerJobMetricGroup; import org.apache.flink.runtime.metrics.groups.TaskManagerMetricGroup; import org.apache.flink.runtime.metrics.groups.TaskMetricGroup; -import org.apache.flink.runtime.metrics.MetricRegistry; +import org.apache.flink.runtime.metrics.MetricRegistryImpl; import org.apache.flink.runtime.executiongraph.ExecutionAttemptID; import org.apache.flink.runtime.jobgraph.JobVertexID; import java.util.UUID; public class UnregisteredTaskMetricsGroup extends TaskMetricGroup { - private static final MetricRegistry EMPTY_REGISTRY = new MetricRegistry(MetricRegistryConfiguration.defaultMetricRegistryConfiguration()); + private static final MetricRegistryImpl EMPTY_REGISTRY = new MetricRegistryImpl(MetricRegistryConfiguration.defaultMetricRegistryConfiguration()); --- End diff -- good catch. Will change it. > Register TaskManagerMetricGroup under ResourceID instead of InstanceID > ---------------------------------------------------------------------- > > Key: FLINK-7876 > URL: https://issues.apache.org/jira/browse/FLINK-7876 > Project: Flink > Issue Type: Improvement > Components: Metrics > Affects Versions: 1.4.0 > Reporter: Till Rohrmann > Assignee: Till Rohrmann > Priority: Minor > Labels: flip-6 > > Currently, the {{TaskManager}} registers the {{TaskManagerMetricGroup}} under > its {{InstanceID}} and thereby binding its metrics effectively to the > lifetime of its registration with the {{JobManager}}. This has also > implications how the REST handler retrieve the TaskManager metrics, namely by > its {{InstanceID}}. > I would actually propose to register the {{TaskManagerMetricGroup}} under the > {{TaskManager}}/{{TaskExecutor}} {{ResourceID}} which is valid over the whole > lifetime of the {{TaskManager}}/{{TaskExecutor}}. That way we would also be > able to query metrics independent of the connection status to the > {{JobManager}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029)