diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java index 1422e950833..b8f00f9778f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java @@ -663,7 +663,7 @@ class MetricsRegionServerWrapperImpl @Override public int getActiveScanners() { - return regionServer.getRpcServices().getScannersCount(); + return regionServer.getRSRpcServices().getScannersCount(); } /** diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java index 6b835bc75b9..b0b6dd07c3e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java @@ -534,7 +534,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler, AdminService.Blockin return; } LOG.info("Scanner lease {} expired {}", this.scannerName, rsh); - server.getMetrics().incrScannerLeaseExpired(); + regionServer.getMetrics().incrScannerLeaseExpired(); RegionScanner s = rsh.s; HRegion region = null; try {