cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [2/3] git commit: Fix nodetool display with vnodes.
Date Fri, 25 Apr 2014 22:06:16 GMT
Fix nodetool display with vnodes.

Patch by brandonwilliams, reviewed by Vijay for CASSANDRA-7082


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

Branch: refs/heads/trunk
Commit: 0ad5e3681b8288ee1779206c0f723aab738e9a4d
Parents: 3a0cd65
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Fri Apr 25 17:02:04 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Fri Apr 25 17:02:04 2014 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ad5e368/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9c78e33..c1c03ea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -114,6 +114,7 @@ Merged from 2.0:
  * Ensure that batchlog and hint timeouts do not produce hints (CASSANDRA-7058)
  * Merge groupable mutations in TriggerExecutor#execute() (CASSANDRA-7047)
 Merged from 1.2:
+ * Fix nodetool display with vnodes (CASSANDRA-7082)
  * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816)
  * add extra SSL cipher suites (CASSANDRA-6613)
  * fix nodetool getsstables for blob PK (CASSANDRA-6803)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ad5e368/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 264a8bf..f8440a3 100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@ -1833,12 +1833,12 @@ public class NodeTool
                 System.out.printf("Note: Ownership information does not include topology;
for complete information, specify a keyspace%n");
             }
 
-            // More tokens then nodes (aka vnodes)?
-            if (tokensToEndpoints.values().size() < tokensToEndpoints.keySet().size())
-                isTokenPerNode = false;
-
             Map<String, SetHostStat> dcs = getOwnershipByDc(probe, resolveIp, tokensToEndpoints,
ownerships);
 
+            // More tokens than nodes (aka vnodes)?
+            if (dcs.values().size() < tokensToEndpoints.keySet().size())
+                isTokenPerNode = false;
+
             findMaxAddressLength(dcs);
 
             // Datacenters


Mime
View raw message