@Override
  public void getMetrics(MetricsCollector metricsCollector, boolean all) {
    MetricsRecordBuilder record = metricsCollector.addRecord(metricsRegistry.info());
    if (wrapper != null) {
      // Summarize the tables
      Map<String, Entry<Long, Long>> tableUsages = wrapper.getTableSpaceUtilization();
      String tableSummary = "[]";
      if (tableUsages != null && !tableUsages.isEmpty()) {
        tableSummary = generateJsonQuotaSummary(tableUsages.entrySet(), "table");
      }
      record.tag(Interns.info(TABLE_QUOTA_USAGE_NAME, TABLE_QUOTA_USAGE_DESC), tableSummary);

      // Summarize the namespaces
      String nsSummary = "[]";
      Map<String, Entry<Long, Long>> namespaceUsages = wrapper.getNamespaceSpaceUtilization();
      if (namespaceUsages != null && !namespaceUsages.isEmpty()) {
        nsSummary = generateJsonQuotaSummary(namespaceUsages.entrySet(), "namespace");
      }
      record.tag(Interns.info(NS_QUOTA_USAGE_NAME, NS_QUOTA_USAGE_DESC), nsSummary);
    }
    metricsRegistry.snapshot(record, all);
  }
Implementation of {@link MetricsMasterQuotaSource} which writes the values passed in via the
interface to the metrics backend.
hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterQuotaSourceImpl.java