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 f06d62652b
commit cc0e630d2b
1 changed files with 1 additions and 2 deletions

View File

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