public MutableHistogram getHistogram(String histoName) {
    // See getGauge for description on how this works.
    MutableMetric histo = metricsMap.get(histoName);
    if (histo == null) {
      MutableHistogram newCounter = new MutableHistogram(new MetricsInfoImpl(histoName, ""));
      histo = metricsMap.putIfAbsent(histoName, newCounter);
      if (histo == null) {
        return newCounter;
      }
    }

    if (!(histo instanceof MutableHistogram)) {
      throw new MetricsException("Metric already exists in registry for metric name: " + histoName
        + " and not of type MutableHistogram");
    }

    return (MutableHistogram) histo;
  }
Get a MetricMutableCounterLong from the storage. If it is not there atomically put it.
@param counterName            Name of the counter to get
@param potentialStartingValue starting value if we have to create a new counter
hbase-hadoop-compat/src/main/java/org/apache/hadoop/metrics2/lib/DynamicMetricsRegistry.java