@Override public void getMetrics(MetricsCollector metricsCollector, boolean all) { metricsRegistry.snapshot(metricsCollector.addRecord(metricsRegistry.info()), all); }
@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); }
@Override public void getMetrics(MetricsCollector metricsCollector, boolean all) { metricsRegistry.snapshot(metricsCollector.addRecord(metricsRegistry.info()), all); }
@Override public void getMetrics(MetricsCollector metricsCollector, boolean all) { metricsRegistry.snapshot(metricsCollector.addRecord(metricsRegistry.info()), all); }
@Override public void getMetrics(MetricsCollector metricsCollector, boolean all) { metricsRegistry.snapshot(metricsCollector.addRecord(metricsRegistry.info()), all); }
@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); }
@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); }