hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1405914 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java
Date Mon, 05 Nov 2012 18:43:13 GMT
Author: liyin
Date: Mon Nov  5 18:43:12 2012
New Revision: 1405914

URL: http://svn.apache.org/viewvc?rev=1405914&view=rev
Log:
[HBASE-6857] [0.89-fb] Add cumulative metrics to keep track of slow operations

Author: aaiyer

Summary:
Currently we use time varying metrics. This does not give us
useful information upon checking the ODS graphs, becaus on the
average these values are pretty low -- 0, or 1.

changing this to be cumulative, so we can keep track of trends.

Test Plan:
built and pushed to my dev cluster

noted that the metrics do show up on jmx

a part of the output on one of the RS:
  "hadoop.regionserver_rpc_slowresponse.all.cumulative": 8068,
  "hadoop.regionserver_rpc_slowresponse.avgtime": 27,
  "hadoop.regionserver_rpc_slowresponse.close.cumulative": 1,
  "hadoop.regionserver_rpc_slowresponse.delete.cumulative": 4,
  "hadoop.regionserver_rpc_slowresponse.get.cumulative": 4039,
  "hadoop.regionserver_rpc_slowresponse.getclosestrowbefore.cumulative": 3,
  "hadoop.regionserver_rpc_slowresponse.maxtime": 909,
  "hadoop.regionserver_rpc_slowresponse.mintime": 2,
  "hadoop.regionserver_rpc_slowresponse.multiput.cumulative": 3957,
  "hadoop.regionserver_rpc_slowresponse.next.cumulative": 50,
  "hadoop.regionserver_rpc_slowresponse.numops": 56,
  "hadoop.regionserver_rpc_slowresponse.openscanner.cumulative": 3,
  "hadoop.regionserver_rpc_slowresponse.put.cumulative": 27,

Reviewers: kannan, kranganathan, liyintang

Reviewed By: kannan

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D615641

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java?rev=1405914&r1=1405913&r2=1405914&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java Mon Nov
 5 18:43:12 2012
@@ -32,6 +32,7 @@ import org.apache.hadoop.hbase.monitorin
 import org.apache.hadoop.hbase.regionserver.HRegionServer;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.util.ParamFormatHelper;
 import org.apache.hadoop.io.Writable;
@@ -613,6 +614,9 @@ public class HBaseRPC {
           if (tooSlow) {
             // increment global slow RPC response counter
             rpcMetrics.inc("slowResponse.", processingTime);
+            HRegion.incrNumericPersistentMetric("slowResponse.all.cumulative", 1);
+            HRegion.incrNumericPersistentMetric("slowResponse."
+                + call.getMethodName() + ".cumulative", 1);
           }
         }
         if (processingTime > 1000) {
@@ -621,6 +625,8 @@ public class HBaseRPC {
           // metric itself
           rpcMetrics.inc(call.getMethodName() + ".aboveOneSec.",
               processingTime);
+          HRegion.incrNumericPersistentMetric(call.getMethodName() +
+              ".aboveOneSec.cumulative", 1);
         }
 
         return retVal;



Mime
View raw message