cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r792343 - in /incubator/cassandra/trunk/src/java/org/apache/cassandra/db: ColumnFamilyStore.java ColumnFamilyStoreMBean.java
Date Wed, 08 Jul 2009 22:49:09 GMT
Author: eevans
Date: Wed Jul  8 22:49:08 2009
New Revision: 792343

URL: http://svn.apache.org/viewvc?rev=792343&view=rev
Log:
added CFS pending tasks JMX attribute

Patch by eevans; reviewed by Arin Sarkissian for CASSANDRA-173

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=792343&r1=792342&r2=792343&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Wed
Jul  8 22:49:08 2009
@@ -1531,6 +1531,11 @@
     {
         return readStats_.mean();
     }
+    
+    public int getPendingTasks()
+    {
+        return memtableLock_.getQueueLength();
+    }
 
     /**
      * @return the number of write operations on this column family in the last minute

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java?rev=792343&r1=792342&r2=792343&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
(original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
Wed Jul  8 22:49:08 2009
@@ -84,4 +84,10 @@
      */
     public double getWriteLatency();
     
+    /**
+     * 
+     * @return the estimated number of tasks pending for this column family
+     */
+    public int getPendingTasks();
+    
 }



Mime
View raw message