From 5b5cce52159d8f25d2223dec9081a6abbaa736ad Mon Sep 17 00:00:00 2001 From: tianhang Date: Wed, 15 Mar 2023 10:07:26 +0800 Subject: [PATCH] HBASE-27713 Remove numRegions in Region Metrics --- .../hbase/regionserver/MetricsRegionAggregateSource.java | 3 --- .../hbase/regionserver/MetricsRegionAggregateSourceImpl.java | 1 - 2 files changed, 4 deletions(-) diff --git a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionAggregateSource.java b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionAggregateSource.java index 74edf74c456e..0d9c742c9f99 100644 --- a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionAggregateSource.java +++ b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionAggregateSource.java @@ -47,9 +47,6 @@ public interface MetricsRegionAggregateSource extends BaseSource { */ String METRICS_JMX_CONTEXT = "RegionServer,sub=" + METRICS_NAME; - String NUM_REGIONS = "numRegions"; - String NUMBER_OF_REGIONS_DESC = "Number of regions in the metrics system"; - /** * Register a MetricsRegionSource as being open. * @param source the source for the region being opened. diff --git a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionAggregateSourceImpl.java b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionAggregateSourceImpl.java index d7313191fe89..6d11fe3bd7ff 100644 --- a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionAggregateSourceImpl.java +++ b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionAggregateSourceImpl.java @@ -99,7 +99,6 @@ public void getMetrics(MetricsCollector collector, boolean all) { ((MetricsRegionSourceImpl) regionMetricSource).snapshot(mrb, all); } } - mrb.addGauge(Interns.info(NUM_REGIONS, NUMBER_OF_REGIONS_DESC), regionSources.size()); metricsRegistry.snapshot(mrb, all); } }