@Override
  public void getMetrics(MetricsCollector collector, boolean all) {
    MetricsRecordBuilder mrb = collector.addRecord(metricsName);
    if (tableSources != null) {
      for (MetricsTableSource tableMetricSource : tableSources.values()) {
        if (tableMetricSource instanceof MetricsTableSourceImpl) {
          ((MetricsTableSourceImpl) tableMetricSource).snapshot(mrb, all);
        }
      }
      mrb.addGauge(Interns.info(NUM_TABLES, NUMBER_OF_TABLES_DESC), tableSources.size());
      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/MetricsTableAggregateSourceImpl.java