hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liang...@apache.org
Subject svn commit: r1594126 - in /hbase/trunk: hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/ hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/ hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ hbase-server/src/test/java/or...
Date Tue, 13 May 2014 05:06:15 GMT
Author: liangxie
Date: Tue May 13 05:06:14 2014
New Revision: 1594126

URL: http://svn.apache.org/r1594126
Log:
Amend HBASE-10561 Forward port: HBASE-10212 New rpc metric: number of active handler

Modified:
    hbase/trunk/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSource.java
    hbase/trunk/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceImpl.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerWrapperStub.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java

Modified: hbase/trunk/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSource.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSource.java?rev=1594126&r1=1594125&r2=1594126&view=diff
==============================================================================
--- hbase/trunk/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSource.java
(original)
+++ hbase/trunk/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSource.java
Tue May 13 05:06:14 2014
@@ -53,6 +53,8 @@ public interface MetricsHBaseServerSourc
   String PRIORITY_QUEUE_DESC = "Number of calls in the priority call queue.";
   String NUM_OPEN_CONNECTIONS_NAME = "numOpenConnections";
   String NUM_OPEN_CONNECTIONS_DESC = "Number of open connections.";
+  String NUM_ACTIVE_HANDLER_NAME = "numActiveHandler";
+  String NUM_ACTIVE_HANDLER_DESC = "Number of active rpc handlers.";
 
   void authorizationSuccess();
 

Modified: hbase/trunk/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceImpl.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceImpl.java?rev=1594126&r1=1594125&r2=1594126&view=diff
==============================================================================
--- hbase/trunk/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceImpl.java
(original)
+++ hbase/trunk/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceImpl.java
Tue May 13 05:06:14 2014
@@ -122,7 +122,9 @@ public class MetricsHBaseServerSourceImp
           .addGauge(Interns.info(PRIORITY_QUEUE_NAME, PRIORITY_QUEUE_DESC),
               wrapper.getPriorityQueueLength())
           .addGauge(Interns.info(NUM_OPEN_CONNECTIONS_NAME,
-              NUM_OPEN_CONNECTIONS_DESC), wrapper.getNumOpenConnections());
+              NUM_OPEN_CONNECTIONS_DESC), wrapper.getNumOpenConnections())
+          .addGauge(Interns.info(NUM_ACTIVE_HANDLER_NAME,
+              NUM_ACTIVE_HANDLER_DESC), wrapper.getActiveRpcHandlerCount());
     }
 
     metricsRegistry.snapshot(mrb, all);

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java?rev=1594126&r1=1594125&r2=1594126&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
Tue May 13 05:06:14 2014
@@ -207,7 +207,7 @@ public class SimpleRpcScheduler implemen
 
   @Override
   public int getActiveRpcHandlerCount() {
-    return 0;
+    return activeHandlerCount.get();
   }
 
   private void consumerLoop(BlockingQueue<CallRunner> myQueue) {

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerWrapperStub.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerWrapperStub.java?rev=1594126&r1=1594125&r2=1594126&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerWrapperStub.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerWrapperStub.java
Tue May 13 05:06:14 2014
@@ -46,6 +46,6 @@ public class MetricsHBaseServerWrapperSt
 
   @Override
   public int getActiveRpcHandlerCount() {
-    return 100;
+    return 106;
   }
 }

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java?rev=1594126&r1=1594125&r2=1594126&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java
Tue May 13 05:06:14 2014
@@ -64,6 +64,7 @@ public class TestRpcMetrics {
     HELPER.assertGauge("numCallsInReplicationQueue", 103, serverSource);
     HELPER.assertGauge("numCallsInPriorityQueue", 104, serverSource);
     HELPER.assertGauge("numOpenConnections", 105, serverSource);
+    HELPER.assertGauge("numActiveHandler", 106, serverSource);
   }
 
   /**



Mime
View raw message