cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [6/8] cassandra git commit: Fix undeclared throwable exception while executing 'nodetool netstats localhost'
Date Mon, 01 Dec 2014 18:23:49 GMT
Fix undeclared throwable exception while executing 'nodetool netstats localhost'

Patch by Vishal Mehta and Carl Yeksigian, reviewed by Carl Yeksigian for CASSANDRA-8122


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

Branch: refs/heads/trunk
Commit: 6424871439c6e203f0531736dcac71b1c50f41d9
Parents: 74a5f79
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Mon Dec 1 12:21:56 2014 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Mon Dec 1 12:21:56 2014 -0600

----------------------------------------------------------------------
 .../org/apache/cassandra/tools/NodeTool.java    | 55 +++++++++++---------
 1 file changed, 29 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/64248714/src/java/org/apache/cassandra/tools/NodeTool.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeTool.java b/src/java/org/apache/cassandra/tools/NodeTool.java
index fe4535b..5038d29 100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@ -638,32 +638,35 @@ public class NodeTool
                 }
             }
 
-            System.out.printf("Read Repair Statistics:%nAttempted: %d%nMismatch (Blocking):
%d%nMismatch (Background): %d%n", probe.getReadRepairAttempted(), probe.getReadRepairRepairedBlocking(),
probe.getReadRepairRepairedBackground());
-
-            MessagingServiceMBean ms = probe.msProxy;
-            System.out.printf("%-25s", "Pool Name");
-            System.out.printf("%10s", "Active");
-            System.out.printf("%10s", "Pending");
-            System.out.printf("%15s%n", "Completed");
-
-            int pending;
-            long completed;
-
-            pending = 0;
-            for (int n : ms.getCommandPendingTasks().values())
-                pending += n;
-            completed = 0;
-            for (long n : ms.getCommandCompletedTasks().values())
-                completed += n;
-            System.out.printf("%-25s%10s%10s%15s%n", "Commands", "n/a", pending, completed);
-
-            pending = 0;
-            for (int n : ms.getResponsePendingTasks().values())
-                pending += n;
-            completed = 0;
-            for (long n : ms.getResponseCompletedTasks().values())
-                completed += n;
-            System.out.printf("%-25s%10s%10s%15s%n", "Responses", "n/a", pending, completed);
+            if (!probe.isStarting())
+            {
+                System.out.printf("Read Repair Statistics:%nAttempted: %d%nMismatch (Blocking):
%d%nMismatch (Background): %d%n", probe.getReadRepairAttempted(), probe.getReadRepairRepairedBlocking(),
probe.getReadRepairRepairedBackground());
+
+                MessagingServiceMBean ms = probe.msProxy;
+                System.out.printf("%-25s", "Pool Name");
+                System.out.printf("%10s", "Active");
+                System.out.printf("%10s", "Pending");
+                System.out.printf("%15s%n", "Completed");
+
+                int pending;
+                long completed;
+
+                pending = 0;
+                for (int n : ms.getCommandPendingTasks().values())
+                    pending += n;
+                completed = 0;
+                for (long n : ms.getCommandCompletedTasks().values())
+                    completed += n;
+                System.out.printf("%-25s%10s%10s%15s%n", "Commands", "n/a", pending, completed);
+
+                pending = 0;
+                for (int n : ms.getResponsePendingTasks().values())
+                    pending += n;
+                completed = 0;
+                for (long n : ms.getResponseCompletedTasks().values())
+                    completed += n;
+                System.out.printf("%-25s%10s%10s%15s%n", "Responses", "n/a", pending, completed);
+            }
         }
     }
 


Mime
View raw message