cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Add max live/tombstoned cells to nodetool cfstats output
Date Fri, 15 Aug 2014 20:44:39 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk f0635da39 -> 642e6c541


Add max live/tombstoned cells to nodetool cfstats output

patch by Robert Stupp; reviewed by Jeremiah Jordan for CASSANDRA-7731


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

Branch: refs/heads/trunk
Commit: f26e86c6c2a31d8428343e794dfa12ef6eb3c2b6
Parents: 141b939
Author: Robert Stupp <snazy@snazy.de>
Authored: Fri Aug 15 23:42:11 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Fri Aug 15 23:42:11 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                       | 1 +
 src/java/org/apache/cassandra/tools/NodeTool.java | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f26e86c6/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5e184a2..b68605e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.1
+ * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
  * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
  * (cqlsh) Error when tracing query (CASSANDRA-7613)
  * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f26e86c6/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 6aca507..d5a4bb3 100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@ -742,8 +742,12 @@ public class NodeTool
                     System.out.println("\t\tCompacted partition minimum bytes: " + probe.getColumnFamilyMetric(keyspaceName,
cfName, "MinRowSize"));
                     System.out.println("\t\tCompacted partition maximum bytes: " + probe.getColumnFamilyMetric(keyspaceName,
cfName, "MaxRowSize"));
                     System.out.println("\t\tCompacted partition mean bytes: " + probe.getColumnFamilyMetric(keyspaceName,
cfName, "MeanRowSize"));
-                    System.out.println("\t\tAverage live cells per slice (last five minutes):
" + ((JmxReporter.HistogramMBean) probe.getColumnFamilyMetric(keyspaceName, cfName, "LiveScannedHistogram")).getMean());
-                    System.out.println("\t\tAverage tombstones per slice (last five minutes):
" + ((JmxReporter.HistogramMBean) probe.getColumnFamilyMetric(keyspaceName, cfName, "TombstoneScannedHistogram")).getMean());
+                    JmxReporter.HistogramMBean histogram = (JmxReporter.HistogramMBean) probe.getColumnFamilyMetric(keyspaceName,
cfName, "LiveScannedHistogram");
+                    System.out.println("\t\tAverage live cells per slice (last five minutes):
" + histogram.getMean());
+                    System.out.println("\t\tMaximum live cells per slice (last five minutes):
" + histogram.getMax());
+                    histogram = (JmxReporter.HistogramMBean) probe.getColumnFamilyMetric(keyspaceName,
cfName, "TombstoneScannedHistogram");
+                    System.out.println("\t\tAverage tombstones per slice (last five minutes):
" + histogram.getMean());
+                    System.out.println("\t\tMaximum tombstones per slice (last five minutes):
" + histogram.getMax());
 
                     System.out.println("");
                 }


Mime
View raw message