Repository: hbase
Updated Branches:
  refs/heads/branch-2 40fbecd97 -> ed21f2617


HBASE-20298 Doc change in read/write/total accounting metrics


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ed21f261
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ed21f261
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ed21f261

Branch: refs/heads/branch-2
Commit: ed21f26171a0224a2d082ea413f76aa5ca8410e5
Parents: 40fbecd
Author: Michael Stack <[email protected]>
Authored: Tue Mar 27 14:50:00 2018 -0700
Committer: Michael Stack <[email protected]>
Committed: Tue Apr 3 17:02:27 2018 -0700

----------------------------------------------------------------------
 .../regionserver/MetricsRegionServerSource.java | 32 +++++++++++---------
 .../ipc/FastPathBalancedQueueRpcExecutor.java   |  3 +-
 .../hbase/regionserver/HRegionServer.java       | 14 ++-------
 3 files changed, 22 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/ed21f261/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java
----------------------------------------------------------------------
diff --git 
a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java
 
b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java
index 70c6da8..1a1535d 100644
--- 
a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java
+++ 
b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java
@@ -238,26 +238,30 @@ public interface MetricsRegionServerSource extends 
BaseSource, JvmPauseMonitorSo
   String MIN_STORE_FILE_AGE = "minStoreFileAge";
   String AVG_STORE_FILE_AGE = "avgStoreFileAge";
   String NUM_REFERENCE_FILES = "numReferenceFiles";
-  String MAX_STORE_FILE_AGE_DESC = "Max age of store files hosted on this 
region server";
-  String MIN_STORE_FILE_AGE_DESC = "Min age of store files hosted on this 
region server";
-  String AVG_STORE_FILE_AGE_DESC = "Average age of store files hosted on this 
region server";
-  String NUM_REFERENCE_FILES_DESC = "Number of reference file on this region 
server";
+  String MAX_STORE_FILE_AGE_DESC = "Max age of store files hosted on this 
RegionServer";
+  String MIN_STORE_FILE_AGE_DESC = "Min age of store files hosted on this 
RegionServer";
+  String AVG_STORE_FILE_AGE_DESC = "Average age of store files hosted on this 
RegionServer";
+  String NUM_REFERENCE_FILES_DESC = "Number of reference file on this 
RegionServer";
   String STOREFILE_SIZE_DESC = "Size of storefiles being served.";
   String TOTAL_REQUEST_COUNT = "totalRequestCount";
   String TOTAL_REQUEST_COUNT_DESC =
-      "Total number of requests this RegionServer has answered.";
+      "Total number of requests this RegionServer has answered; increments the 
count once for " +
+          "EVERY access whether an admin operation, a Scan, a Put or Put of 1M 
rows, or a Get " +
+          "of a non-existent row";
   String TOTAL_ROW_ACTION_REQUEST_COUNT = "totalRowActionRequestCount";
   String TOTAL_ROW_ACTION_REQUEST_COUNT_DESC =
-      "Total number of region requests this RegionServer has answered, count 
by row-level action";
+      "Total number of region requests this RegionServer has answered; counts 
by row-level " +
+          "action at the RPC Server (Sums 'readRequestsCount' and 
'writeRequestsCount'); counts" +
+          "once per access whether a Put of 1M rows or a Get that returns 1M 
Results";
   String READ_REQUEST_COUNT = "readRequestCount";
   String READ_REQUEST_COUNT_DESC =
-      "Number of read requests this region server has answered.";
+      "Number of read requests with non-empty Results that this RegionServer 
has answered.";
   String FILTERED_READ_REQUEST_COUNT = "filteredReadRequestCount";
   String FILTERED_READ_REQUEST_COUNT_DESC =
-    "Number of filtered read requests this region server has answered.";
+    "Number of filtered read requests this RegionServer has answered.";
   String WRITE_REQUEST_COUNT = "writeRequestCount";
   String WRITE_REQUEST_COUNT_DESC =
-      "Number of mutation requests this region server has answered.";
+      "Number of mutation requests this RegionServer has answered.";
   String CHECK_MUTATE_FAILED_COUNT = "checkMutateFailedCount";
   String CHECK_MUTATE_FAILED_COUNT_DESC =
       "Number of Check and Mutate calls that failed the checks.";
@@ -527,17 +531,17 @@ public interface MetricsRegionServerSource extends 
BaseSource, JvmPauseMonitorSo
     = "Total number of bytes that is output from compaction, major only";
 
   String RPC_GET_REQUEST_COUNT = "rpcGetRequestCount";
-  String RPC_GET_REQUEST_COUNT_DESC = "Number of rpc get requests this region 
server has answered.";
+  String RPC_GET_REQUEST_COUNT_DESC = "Number of rpc get requests this 
RegionServer has answered.";
   String RPC_SCAN_REQUEST_COUNT = "rpcScanRequestCount";
   String RPC_SCAN_REQUEST_COUNT_DESC =
-      "Number of rpc scan requests this region server has answered.";
+      "Number of rpc scan requests this RegionServer has answered.";
   String RPC_MULTI_REQUEST_COUNT = "rpcMultiRequestCount";
   String RPC_MULTI_REQUEST_COUNT_DESC =
-      "Number of rpc multi requests this region server has answered.";
+      "Number of rpc multi requests this RegionServer has answered.";
   String RPC_MUTATE_REQUEST_COUNT = "rpcMutateRequestCount";
   String RPC_MUTATE_REQUEST_COUNT_DESC =
-      "Number of rpc mutation requests this region server has answered.";
+      "Number of rpc mutation requests this RegionServer has answered.";
   String AVERAGE_REGION_SIZE = "averageRegionSize";
   String AVERAGE_REGION_SIZE_DESC =
-      "Average region size over the region server including memstore and 
storefile sizes.";
+      "Average region size over the RegionServer including memstore and 
storefile sizes.";
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/ed21f261/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FastPathBalancedQueueRpcExecutor.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FastPathBalancedQueueRpcExecutor.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FastPathBalancedQueueRpcExecutor.java
index eaea34d..d9f9797 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FastPathBalancedQueueRpcExecutor.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FastPathBalancedQueueRpcExecutor.java
@@ -80,6 +80,7 @@ public class FastPathBalancedQueueRpcExecutor extends 
BalancedQueueRpcExecutor {
     // if an empty queue of CallRunners so we are available for direct handoff 
when one comes in.
     final Deque<FastPathHandler> fastPathHandlerStack;
     // Semaphore to coordinate loading of fastpathed loadedTask and our 
running it.
+    // UNFAIR synchronization.
     private Semaphore semaphore = new Semaphore(0);
     // The task we get when fast-pathing.
     private CallRunner loadedCallRunner;
@@ -112,7 +113,7 @@ public class FastPathBalancedQueueRpcExecutor extends 
BalancedQueueRpcExecutor {
     }
 
     /**
-     * @param task Task gotten via fastpath.
+     * @param cr Task gotten via fastpath.
      * @return True if we successfully loaded our task
      */
     boolean loadCallRunner(final CallRunner cr) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/ed21f261/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index aa5ee3d..62562f5 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -47,7 +47,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.function.Function;
 import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
 import javax.servlet.http.HttpServlet;
 import org.apache.commons.lang3.RandomUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -166,7 +165,6 @@ import org.apache.hadoop.hbase.zookeeper.ZKUtil;
 import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
 import org.apache.hadoop.hbase.zookeeper.ZNodePaths;
 import org.apache.hadoop.ipc.RemoteException;
-import org.apache.hadoop.metrics2.util.MBeans;
 import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.zookeeper.KeeperException;
@@ -457,11 +455,6 @@ public class HRegionServer extends HasThread implements
   protected String clusterId;
 
   /**
-   * MX Bean for RegionServerInfo
-   */
-  private ObjectName mxBean = null;
-
-  /**
    * Chore to clean periodically the moved region list
    */
   private MovedRegionsCleaner movedRegionsCleaner;
@@ -1021,12 +1014,9 @@ public class HRegionServer extends HasThread implements
         abort(prefix + t.getMessage(), t);
       }
     }
-    // Run shutdown.
-    if (mxBean != null) {
-      MBeans.unregister(mxBean);
-      mxBean = null;
+    if (this.leases != null) {
+      this.leases.closeAfterLeasesExpire();
     }
-    if (this.leases != null) this.leases.closeAfterLeasesExpire();
     if (this.splitLogWorker != null) {
       splitLogWorker.stop();
     }

Reply via email to