HBASE-18568 Correct metric of numRegions

Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
张世彬10204932 2017-08-11 14:24:54 +08:00 committed by tedyu
parent 47a5614edd
commit cebcb4dd1e
1 changed files with 1 additions and 2 deletions

View File

@ -69,6 +69,7 @@ public class MetricsRegionSourceImpl implements MetricsRegionSource {
MetricsRegionAggregateSourceImpl aggregate) { MetricsRegionAggregateSourceImpl aggregate) {
this.regionWrapper = regionWrapper; this.regionWrapper = regionWrapper;
agg = aggregate; agg = aggregate;
hashCode = regionWrapper.getRegionHashCode();
agg.register(this); agg.register(this);
LOG.debug("Creating new MetricsRegionSourceImpl for table " + LOG.debug("Creating new MetricsRegionSourceImpl for table " +
@ -100,8 +101,6 @@ public class MetricsRegionSourceImpl implements MetricsRegionSource {
regionScanKey = regionNamePrefix + MetricsRegionServerSource.SCAN_KEY + suffix; regionScanKey = regionNamePrefix + MetricsRegionServerSource.SCAN_KEY + suffix;
regionScan = registry.getCounter(regionScanKey, 0L); regionScan = registry.getCounter(regionScanKey, 0L);
hashCode = regionWrapper.getRegionHashCode();
} }
@Override @Override