cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject [1/2] git commit: Sort nodetool help output patch by mmainali reviewed by dbrosius for cassandra-5776
Date Tue, 23 Jul 2013 00:45:34 GMT
Updated Branches:
  refs/heads/trunk 0396ff478 -> 5e469ea79


Sort nodetool help output
patch by mmainali reviewed by dbrosius for cassandra-5776


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

Branch: refs/heads/trunk
Commit: 0f0a11c979d5ed8503dbba87894e685245cc1b41
Parents: b0f7bab
Author: Dave Brosius <dbrosius@apache.org>
Authored: Mon Jul 22 20:41:31 2013 -0400
Committer: Dave Brosius <dbrosius@apache.org>
Committed: Mon Jul 22 20:41:31 2013 -0400

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0f0a11c9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5d74d67..da03306 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -25,6 +25,7 @@
  * Fix formatting of sstable2json with multiple -k arguments (CASSANDRA-5781)
  * Don't rely on row marker for queries in general to hide lost markers
    after TTL expires (CASSANDRA-5762)
+ * Sort nodetool help output (CASSANDRA-5776)
 
 
 1.2.6

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0f0a11c9/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 dce83b8..0bedd4e 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -172,6 +172,14 @@ public class NodeCmd
         StringBuilder header = new StringBuilder(512);
         header.append("\nAvailable commands\n");
         final NodeToolHelp ntHelp = loadHelp();
+        Collections.sort(ntHelp.commands, new Comparator<NodeToolHelp.NodeToolCommand>()

+        {
+            @Override
+            public int compare(NodeToolHelp.NodeToolCommand o1, NodeToolHelp.NodeToolCommand
o2) 
+            {
+                return o1.name.compareTo(o2.name);
+            }
+        });
         for(NodeToolHelp.NodeToolCommand cmd : ntHelp.commands)
             addCmdHelp(header, cmd);
         String usage = String.format("java %s --host <arg> <command>%n", NodeCmd.class.getName());


Mime
View raw message