cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [4/8] git commit: Print a warning when using nodetool ring with vnodes. Patch by Lyuben Todorov, reviewed by brandonwilliams for CASSANDRA-5954
Date Tue, 24 Sep 2013 15:30:02 GMT
Print a warning when using nodetool ring with vnodes.
Patch by Lyuben Todorov, reviewed by brandonwilliams for CASSANDRA-5954


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

Branch: refs/heads/trunk
Commit: fa8d92312e2f881fab8e58c8afc7265bd0d52bab
Parents: bb3ec4c
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Sep 24 10:26:04 2013 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Sep 24 10:26:04 2013 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fa8d9231/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 26cc50e..4416a37 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -31,6 +31,7 @@ import java.util.concurrent.ExecutionException;
 import com.google.common.base.Joiner;
 import com.google.common.collect.LinkedHashMultimap;
 import com.google.common.collect.Maps;
+import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.commons.cli.*;
 import org.yaml.snakeyaml.Loader;
@@ -279,6 +280,12 @@ public class NodeCmd
         {
             throw new RuntimeException(e);
         }
+
+        if(DatabaseDescriptor.getNumTokens() > 1)
+        {
+            outs.println("  Warning: \"nodetool ring\" is used to output all the tokens of
a node.");
+            outs.println("  To view status related info of a node use \"nodetool status\"
instead.\n");
+        }
     }
 
     private void printDc(PrintStream outs, String format, String dc, LinkedHashMultimap<String,
String> endpointsToTokens,


Mime
View raw message