hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1068190 - in /hbase/branches/0.90: ./ src/main/java/org/apache/hadoop/hbase/regionserver/ src/main/java/org/apache/hadoop/hbase/regionserver/metrics/
Date Mon, 07 Feb 2011 22:28:06 GMT
Author: todd
Date: Mon Feb  7 22:28:05 2011
New Revision: 1068190

URL: http://svn.apache.org/viewvc?rev=1068190&view=rev
Log:
HBASE-3509. Add metric for flush queue length

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/RegionServerMetrics.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1068190&r1=1068189&r2=1068190&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Mon Feb  7 22:28:05 2011
@@ -36,6 +36,7 @@ Release 0.90.1 - Unreleased
    HBASE-3508  LruBlockCache statistics thread should have a name
    HBASE-3511  Allow rolling restart to apply to only RS or only masters
    HBASE-3510  Add thread name for IPC reader threads
+   HBASE-3509  Add metric for flush queue length
 
 Release 0.90.0 - January 19th, 2011
   INCOMPATIBLE CHANGES

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1068190&r1=1068189&r2=1068190&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Mon Feb  7 22:28:05 2011
@@ -1173,6 +1173,8 @@ public class HRegionServer implements HR
         .set((int) (storefileIndexSize / (1024 * 1024)));
     this.metrics.compactionQueueSize.set(compactSplitThread
         .getCompactionQueueSize());
+    this.metrics.flushQueueSize.set(cacheFlusher
+        .getFlushQueueSize());
 
     LruBlockCache lruBlockCache = (LruBlockCache) StoreFile.getBlockCache(conf);
     if (lruBlockCache != null) {

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java?rev=1068190&r1=1068189&r2=1068190&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
Mon Feb  7 22:28:05 2011
@@ -263,6 +263,10 @@ class MemStoreFlusher extends Thread imp
     }
   }
 
+  public int getFlushQueueSize() {
+    return flushQueue.size();
+  }
+
   /**
    * Only interrupt once it's done with a run through the work loop.
    */

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/RegionServerMetrics.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/RegionServerMetrics.java?rev=1068190&r1=1068189&r2=1068190&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/RegionServerMetrics.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/RegionServerMetrics.java
Mon Feb  7 22:28:05 2011
@@ -144,6 +144,12 @@ public class RegionServerMetrics impleme
    */
   public final MetricsIntValue compactionQueueSize =
     new MetricsIntValue("compactionQueueSize", registry);
+  
+  /**
+   * Size of the flush queue.
+   */
+  public final MetricsIntValue flushQueueSize =
+    new MetricsIntValue("flushQueueSize", registry);
 
   /**
    * filesystem read latency
@@ -240,6 +246,7 @@ public class RegionServerMetrics impleme
       this.regions.pushMetric(this.metricsRecord);
       this.requests.pushMetric(this.metricsRecord);
       this.compactionQueueSize.pushMetric(this.metricsRecord);
+      this.flushQueueSize.pushMetric(this.metricsRecord);
       this.blockCacheSize.pushMetric(this.metricsRecord);
       this.blockCacheFree.pushMetric(this.metricsRecord);
       this.blockCacheCount.pushMetric(this.metricsRecord);
@@ -340,6 +347,8 @@ public class RegionServerMetrics impleme
       Integer.valueOf(this.memstoreSizeMB.get()));
     sb = Strings.appendKeyValue(sb, "compactionQueueSize",
       Integer.valueOf(this.compactionQueueSize.get()));
+    sb = Strings.appendKeyValue(sb, "flushQueueSize",
+      Integer.valueOf(this.flushQueueSize.get()));
     // Duplicate from jvmmetrics because metrics are private there so
     // inaccessible.
     MemoryUsage memory =



Mime
View raw message