Updated Branches: refs/heads/trunk fb15aa9f6 -> b8de48851
make nodetool accept -ve tokens patch by Vijay; reviewed by slebresne for CASSANDRA-4808 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b8de4885 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b8de4885 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b8de4885 Branch: refs/heads/trunk Commit: b8de4885192e5d83a38be21ae0a17b59504e0d33 Parents: fb15aa9 Author: Vijay Parthasarathy <vijay2...@gmail.com> Authored: Tue Oct 23 11:00:56 2012 -0700 Committer: Vijay Parthasarathy <vijay2...@gmail.com> Committed: Tue Oct 23 11:00:56 2012 -0700 ---------------------------------------------------------------------- src/java/org/apache/cassandra/tools/NodeCmd.java | 12 +++++++----- .../org/apache/cassandra/tools/NodeToolHelp.yaml | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b8de4885/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 340219e..ceedfec 100644 --- a/src/java/org/apache/cassandra/tools/NodeCmd.java +++ b/src/java/org/apache/cassandra/tools/NodeCmd.java @@ -33,7 +33,6 @@ import com.google.common.collect.LinkedHashMultimap; import com.google.common.collect.Maps; import org.apache.commons.cli.*; -import org.apache.cassandra.config.DatabaseDescriptor; import org.apache.cassandra.service.CacheServiceMBean; import org.apache.cassandra.service.PBSPredictionResult; import org.apache.cassandra.service.PBSPredictorMBean; @@ -49,8 +48,6 @@ import org.apache.cassandra.exceptions.InvalidRequestException; import org.apache.cassandra.io.util.FileUtils; import org.apache.cassandra.locator.EndpointSnitchInfoMBean; import org.apache.cassandra.net.MessagingServiceMBean; -import org.apache.cassandra.service.CacheServiceMBean; -import org.apache.cassandra.service.StorageProxyMBean; import org.apache.cassandra.utils.EstimatedHistogram; import org.apache.cassandra.utils.Pair; import org.yaml.snakeyaml.Loader; @@ -1440,8 +1437,13 @@ public class NodeCmd String[] toReturn = new String[params.size() - 1]; for (int i = 1; i < params.size(); i++) - toReturn[i - 1] = (String) params.get(i); - + { + String parm = (String) params.get(i); + // why? look at CASSANDRA-4808 + if (parm.startsWith("\\")) + parm = parm.substring(1); + toReturn[i - 1] = parm; + } return toReturn; } } http://git-wip-us.apache.org/repos/asf/cassandra/blob/b8de4885/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml ---------------------------------------------------------------------- diff --git a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml index bbea055..677b689 100644 --- a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml +++ b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml @@ -82,7 +82,7 @@ commands: Print network information on provided host (connecting node by default) - name: move <new token> help: | - Move node on the token ring to a new token + Move node on the token ring to a new token. (for -ve tokens, use \\ to escape, Example: move \\-123) - name: removenode status|force|<ID> help: | Show status of current node removal, force completion of pending removal or remove provided ID