cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [4/6] git commit: add "all time blocked" to StatusLogger output patch by Tyler Hobbs; reviewed by jbellis for CASSANDRA-5825
Date Fri, 02 Aug 2013 17:19:07 GMT
add "all time blocked" to StatusLogger output
patch by Tyler Hobbs; reviewed by jbellis for CASSANDRA-5825


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ec673ac9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ec673ac9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ec673ac9

Branch: refs/heads/trunk
Commit: ec673ac99708ba6c0d62a50f6c870d846a7435ba
Parents: a117243
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Aug 2 12:16:17 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Aug 2 12:16:17 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                           |  1 +
 src/java/org/apache/cassandra/utils/StatusLogger.java | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec673ac9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 377b5a1..8eff1fd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@
  * nodetool history logging (CASSANDRA-5823)
  * (Hadoop) fix support for Thrift tables in CqlPagingRecordReader 
    (CASSANDRA-5752)
+ * add "all time blocked" to StatusLogger output (CASSANDRA-5825)
 
 
 1.2.8

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec673ac9/src/java/org/apache/cassandra/utils/StatusLogger.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/StatusLogger.java b/src/java/org/apache/cassandra/utils/StatusLogger.java
index 4cb7898..cf5c5fa 100644
--- a/src/java/org/apache/cassandra/utils/StatusLogger.java
+++ b/src/java/org/apache/cassandra/utils/StatusLogger.java
@@ -50,7 +50,7 @@ public class StatusLogger
         MBeanServer server = ManagementFactory.getPlatformMBeanServer();
 
         // everything from o.a.c.concurrent
-        logger.info(String.format("%-25s%10s%10s%10s", "Pool Name", "Active", "Pending",
"Blocked"));
+        logger.info(String.format("%-25s%10s%10s%15s%10s%18s", "Pool Name", "Active", "Pending",
"Completed", "Blocked", "All Time Blocked"));
         Set<ObjectName> request, internal;
         try
         {
@@ -65,8 +65,13 @@ public class StatusLogger
         {
             String poolName = objectName.getKeyProperty("type");
             JMXEnabledThreadPoolExecutorMBean threadPoolProxy = JMX.newMBeanProxy(server,
objectName, JMXEnabledThreadPoolExecutorMBean.class);
-            logger.info(String.format("%-25s%10s%10s%10s",
-                                      poolName, threadPoolProxy.getActiveCount(), threadPoolProxy.getPendingTasks(),
threadPoolProxy.getCurrentlyBlockedTasks()));
+            logger.info(String.format("%-25s%10s%10s%15s%10s%18s",
+                                      poolName,
+                                      threadPoolProxy.getActiveCount(),
+                                      threadPoolProxy.getPendingTasks(),
+                                      threadPoolProxy.getCompletedTasks(),
+                                      threadPoolProxy.getCurrentlyBlockedTasks(),
+                                      threadPoolProxy.getTotalBlockedTasks()));
         }
         // one offs
         CompactionManager cm = CompactionManager.instance;


Mime
View raw message