private void registerAll(String prefix, MetricSet metricSet) {
    for (Map.Entry<String, Metric> entry : metricSet.getMetrics().entrySet()) {
      if (entry.getValue() instanceof MetricSet) {
        registerAll(prefix + "." + entry.getKey(), (MetricSet) entry.getValue());
      } else {
        registry.register(prefix + "." + entry.getKey(), entry.getValue());
      }
    }
  }
Get a Map that represents a multi-field metric,
or create a new one if it does not already exist.
@param name Name of map metric.  This should come from MetricConstants
@return MapMetric .
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/metrics/Metrics.java