org.apache.hadoop.metrics2.MetricsException: Metrics source ClusterMetrics already exists!

Apache's JIRA Issue Tracker | Vinod Kumar Vavilapalli | 3 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.

Root Cause Analysis

  1. org.apache.hadoop.metrics2.MetricsException

    Metrics source ClusterMetrics already exists!

    at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.newSourceName()
  2. Hadoop
    MetricsSystemImpl.register
    1. org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.newSourceName(DefaultMetricsSystem.java:134)
    2. org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.sourceName(DefaultMetricsSystem.java:115)
    3. org.apache.hadoop.metrics2.impl.MetricsSystemImpl.register(MetricsSystemImpl.java:217)
    3 frames
  3. hadoop-yarn-server-resourcemanager
    NodesListManager.serviceInit
    1. org.apache.hadoop.yarn.server.resourcemanager.ClusterMetrics.registerMetrics(ClusterMetrics.java:71)
    2. org.apache.hadoop.yarn.server.resourcemanager.ClusterMetrics.getMetrics(ClusterMetrics.java:58)
    3. org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.setDecomissionedNMsMetrics(NodesListManager.java:131)
    4. org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.serviceInit(NodesListManager.java:78)
    4 frames
  4. Hadoop
    CompositeService.serviceInit
    1. org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
    2. org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:107)
    2 frames
  5. hadoop-yarn-server-resourcemanager
    ResourceManager$RMActiveServices.serviceInit
    1. org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceInit(ResourceManager.java:465)
    1 frame
  6. Hadoop
    AbstractService.init
    1. org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
    1 frame
  7. hadoop-yarn-server-resourcemanager
    ResourceManager.serviceInit
    1. org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.createAndInitActiveServices(ResourceManager.java:818)
    2. org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceInit(ResourceManager.java:231)
    2 frames
  8. Hadoop
    AbstractService.init
    1. org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
    1 frame
  9. hadoop-yarn-server-resourcemanager
    TestResourceTrackerService.testDecommissionWithIncludeHosts
    1. org.apache.hadoop.yarn.server.resourcemanager.MockRM.<init>(MockRM.java:90)
    2. org.apache.hadoop.yarn.server.resourcemanager.MockRM.<init>(MockRM.java:85)
    3. org.apache.hadoop.yarn.server.resourcemanager.TestResourceTrackerService.testDecommissionWithIncludeHosts(TestResourceTrackerService.java:94)
    3 frames