Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-11816

Initializing custom Metrics implementation failed in Mapper or Reducer

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.99.0, 0.98.6
    • Component/s: metrics
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When I want to initialize a custom MetricsSource implementation which extends class BaseSourceImpl in Mapper or Reducer’s setup stage, an exception will be thrown:
      Error: org.apache.hadoop.metrics2.MetricsException: Metrics source JvmMetrics already exists!
      at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.newSourceName(DefaultMetricsSystem.java:126)
      at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.sourceName(DefaultMetricsSystem.java:107)
      at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.register(MetricsSystemImpl.java:217)
      at org.apache.hadoop.metrics2.source.JvmMetrics.create(JvmMetrics.java:78)
      at org.apache.hadoop.hbase.metrics.BaseSourceImpl$DefaultMetricsSystemInitializer.init(BaseSourceImpl.java:51)
      at org.apache.hadoop.hbase.metrics.BaseSourceImpl.<init>(BaseSourceImpl.java:74)
      at org.apache.hadoop.hbase.mapreduce.IdentityTableReducer.setup(IdentityTableReducer.java:89)
      at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:168)
      at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:627)
      at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
      at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:167)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:415)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
      at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)

      The bug is similar to https://issues.apache.org/jira/browse/MAPREDUCE-3976

        Attachments

        1. hbase-11816.patch
          0.8 kB
          Huafeng Wang

          Issue Links

            Activity

              People

              • Assignee:
                HuafengWang Huafeng Wang
                Reporter:
                HuafengWang Huafeng Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: