public Long getNumCounter() {
      try {
        return (Long) metrics.get(numCounter);
      } catch (JMException e) {
        LOG.warn("Could not find counter value for " + numCounter + ", returning null instead. ", e);
        return null;
      }
    }
Instantiates a named scope - intended to only be called by Metrics, so locally scoped.
@param name - name of the variable
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java