cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/4] git commit: Fix nodetool display with vnodes.
Date Fri, 25 Apr 2014 22:01:38 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 343b3fdbc -> c3be2fefd


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/63ba5886
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/63ba5886
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/63ba5886

Branch: refs/heads/trunk
Commit: 63ba5886e3ee3d6e5b5ab538c4b2e5890bfebeb3
Parents: 08a9d38
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Fri Apr 25 16:50:41 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Fri Apr 25 16:50:41 2014 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/63ba5886/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b3470bf..aad3721 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.17
+ * Fix nodetool display with vnodes (CASSANDRA-7082)
  * Fix schema concurrency exceptions (CASSANDRA-6841)
  * Fix BatchlogManager#deleteBatch() use of millisecond timsestamps
    (CASSANDRA-6822)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/63ba5886/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 4901806..d7517cc 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -476,12 +476,12 @@ public class NodeCmd
                 outs.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(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