Repository: hbase Updated Branches: refs/heads/master 47a5614ed -> cebcb4dd1
HBASE-18568 Correct metric of numRegions Signed-off-by: tedyu <yuzhih...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/cebcb4dd Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/cebcb4dd Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/cebcb4dd Branch: refs/heads/master Commit: cebcb4dd1e4595a96d46c0e5fa9991c456ce3bb2 Parents: 47a5614 Author: å¼ ä¸å½¬10204932 <zhang.shi...@zte.com.cn> Authored: Fri Aug 11 14:24:54 2017 +0800 Committer: tedyu <yuzhih...@gmail.com> Committed: Mon Aug 28 19:39:37 2017 -0700 ---------------------------------------------------------------------- .../apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/cebcb4dd/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java ---------------------------------------------------------------------- diff --git a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java index b843b03..ef02b77 100644 --- a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java +++ b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java @@ -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