hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1426810 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Sat, 29 Dec 2012 19:18:50 GMT
Author: liyin
Date: Sat Dec 29 19:18:50 2012
New Revision: 1426810

URL: http://svn.apache.org/viewvc?rev=1426810&view=rev
Log:
[HBASE-7276] Keep track of total requests number more actively

Author: liyintang

Summary: Previously, RS generates the total number of requests once the metrics has been pushed,
which is usually 1 min interval. In order to get the fine-grained data in the master UI, RS
shall keep track of the delta by itself.

Test Plan: tested on my dev clusters

Reviewers: adela

Reviewed By: adela

CC: hbase-eng@

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

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1426810&r1=1426809&r2=1426810&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Sat Dec 29 19:18:50 2012
@@ -351,6 +351,8 @@ public class HRegionServer implements HR
   // large GC issues.
   private static long responseSizeLimit;
   public static boolean enableServerSideProfilingForAllCalls;
+  
+  private int numRowRequests = 0;
 
   public static long getResponseSizeLimit() {
     return responseSizeLimit;
@@ -652,7 +654,7 @@ public class HRegionServer implements HR
               ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
             doMetrics();
             HServerLoad hsl = new HServerLoad(
-              (int)this.metrics.requests.getPreviousIntervalValue(),
+              this.numRowRequests,
               (int)(memory.getUsed()/1024/1024),
               (int)(memory.getMax()/1024/1024));
             for (HRegion r: onlineRegions.values()) {
@@ -1417,10 +1419,10 @@ public class HRegionServer implements HR
       HRegion.setNumericMetric(e.getKey(), e.getValue().longValue());
     }
     
-    
     this.metrics.rowReadCnt.inc(rowReadCnt);
     this.metrics.rowUpdatedCnt.inc(rowUpdateCnt);
-    this.metrics.requests.inc(rowReadCnt + rowUpdateCnt);
+    this.numRowRequests  = rowReadCnt + rowUpdateCnt;
+    this.metrics.requests.inc(numRowRequests);
     
     this.metrics.stores.set(stores);
     this.metrics.storefiles.set(storefiles);



Mime
View raw message