cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/3] cassandra git commit: Fix missing key estimate in nodetool
Date Sun, 07 Dec 2014 22:44:47 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 773a38f79 -> 5d41dab15
  refs/heads/trunk 6ff4b5e90 -> 839bfab16


Fix missing key estimate in nodetool

Patch by Lyuben Todorov, reviewed by brandonwilliams for CASSANDRA-8400


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

Branch: refs/heads/cassandra-2.1
Commit: 5d41dab152ef9047270e8b76a1a499f73860e9ac
Parents: 773a38f
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Sun Dec 7 16:43:07 2014 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Sun Dec 7 16:43:07 2014 -0600

----------------------------------------------------------------------
 src/java/org/apache/cassandra/tools/NodeTool.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5d41dab1/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 5038d29..2cc0b98 100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@ -803,6 +803,10 @@ public class NodeTool
                     System.out.println("\t\tSpace used by snapshots (total): " + format((Long)
probe.getColumnFamilyMetric(keyspaceName, cfName, "SnapshotsSize"), humanReadable));
                     System.out.println("\t\tOff heap memory used (total): " + format(offHeapSize,
humanReadable));
                     System.out.println("\t\tSSTable Compression Ratio: " + probe.getColumnFamilyMetric(keyspaceName,
cfName, "CompressionRatio"));
+                    int numberOfKeys = 0;
+                    for (long keys : (long[]) probe.getColumnFamilyMetric(keyspaceName, cfName,
"EstimatedColumnCountHistogram"))
+                        numberOfKeys += keys;
+                    System.out.println("\t\tNumber of keys (estimate): " + numberOfKeys);
                     System.out.println("\t\tMemtable cell count: " + probe.getColumnFamilyMetric(keyspaceName,
cfName, "MemtableColumnsCount"));
                     System.out.println("\t\tMemtable data size: " + format((Long) probe.getColumnFamilyMetric(keyspaceName,
cfName, "MemtableLiveDataSize"), humanReadable));
                     System.out.println("\t\tMemtable off heap memory used: " + format(memtableOffHeapSize,
humanReadable));


Mime
View raw message