cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r792597 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java
Date Thu, 09 Jul 2009 16:18:39 GMT
Author: eevans
Date: Thu Jul  9 16:18:39 2009
New Revision: 792597

URL: http://svn.apache.org/viewvc?rev=792597&view=rev
Log:
add PendingTasks attribute to NodeProbe cfstats output

Patch by Sammy Yu; reviewed by Arin Sarkissian for CASSANDRA-285

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java?rev=792597&r1=792596&r2=792597&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java Thu Jul 
9 16:18:39 2009
@@ -324,6 +324,7 @@
                 List <ColumnFamilyStoreMBean> columnFamilies = cfstoreMap.get(tableName);
                 int tableReadCount = 0;
                 int tableWriteCount = 0;
+                int tablePendingTasks = 0;
                 double tableTotalReadTime = 0.0f;
                 double tableTotalWriteTime = 0.0f;
                 
@@ -336,6 +337,7 @@
                     tableTotalReadTime += cfstore.getReadLatency() * readCount;
                     tableWriteCount += writeCount;
                     tableTotalWriteTime += cfstore.getWriteLatency() * writeCount;
+                    tablePendingTasks += cfstore.getPendingTasks();
                 }
                 
                 double tableReadLatency = Double.NaN;
@@ -352,6 +354,7 @@
                 outs.println("\tRead Latency: " + String.format("%01.3f", tableReadLatency)
+ " ms.");
                 outs.println("\tWrite Count: " + tableWriteCount);
                 outs.println("\tWrite Latency: " + String.format("%01.3f", tableWriteLatency)
+ " ms.");
+                outs.println("\tPending Tasks: " + tablePendingTasks);
                 // print out column family statistic for this table
                 for (ColumnFamilyStoreMBean cfstore: columnFamilies) {
                     outs.println("\t\tColumn Family: " + cfstore.getColumnFamilyName());
@@ -363,6 +366,7 @@
                     outs.println("\t\tRead Latency: " + String.format("%01.3f", cfstore.getReadLatency())
+ " ms.");
                     outs.println("\t\tWrite Count: " + cfstore.getWriteCount());
                     outs.println("\t\tWrite Latency: " + String.format("%01.3f", cfstore.getWriteLatency())
+ " ms.");
+                    outs.println("\t\tPending Tasks: " + cfstore.getPendingTasks());
                     outs.println("");
                 }
                 outs.println("----------------");



Mime
View raw message