@Override
  public void getMetrics(MetricsCollector collector, boolean all) {
    MetricsRecordBuilder mrb = collector.addRecord(metricsName);

    if (regionSources != null) {
      for (MetricsRegionSource regionMetricSource : regionSources) {
        if (regionMetricSource instanceof MetricsRegionSourceImpl) {
          ((MetricsRegionSourceImpl) regionMetricSource).snapshot(mrb, all);
        }
      }
      metricsRegistry.snapshot(mrb, all);
    }
  }
Yes this is a get function that doesn't return anything. Thanks Hadoop for breaking all
expectations of java programmers. Instead of returning anything Hadoop metrics expects
getMetrics to push the metrics into the collector.
@param collector the collector
@param all       get all the metrics regardless of when they last changed.
hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionAggregateSourceImpl.java