cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasobr...@apache.org
Subject [1/6] cassandra git commit: Fix stress daemon help message
Date Wed, 18 Jan 2017 20:53:15 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 5f66d48b3 -> 3f41d7a76
  refs/heads/cassandra-3.11 d38828953 -> affa68fd1
  refs/heads/trunk 3d2439ab0 -> d32ae4a60


Fix stress daemon help message

patch by Christopher Bailey; reviewed by Blake Eggleston for CASSANDRA-12563


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

Branch: refs/heads/cassandra-3.0
Commit: 3f41d7a76feeb764ec4ec12d7f61a6c6ebc45111
Parents: 5f66d48
Author: Chris Batey <christopher.batey@gmail.com>
Authored: Tue Aug 30 08:53:09 2016 +0100
Committer: Jason Brown <jasedbrown@gmail.com>
Committed: Wed Jan 18 12:49:56 2017 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../cassandra/stress/settings/SettingsMisc.java | 51 +++++++-------------
 2 files changed, 18 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f41d7a7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5a63213..97d49af 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.11
+ * Stress daemon help is incorrect (CASSANDRA-12563)
  * Remove ALTER TYPE support (CASSANDRA-12443)
  * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
  * Set javac encoding to utf-8 (CASSANDRA-11077)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f41d7a7/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMisc.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMisc.java b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMisc.java
index 5735f9d..5334f25 100644
--- a/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMisc.java
+++ b/tools/stress/src/org/apache/cassandra/stress/settings/SettingsMisc.java
@@ -153,52 +153,35 @@ public class SettingsMisc implements Serializable
 
     public static Runnable helpHelpPrinter()
     {
-        return new Runnable()
-        {
-            @Override
-            public void run()
-            {
-                System.out.println("Usage: ./bin/cassandra-stress help <command|option>");
-                System.out.println("Commands:");
-                for (Command cmd : Command.values())
-                    System.out.println("    " + cmd.names.toString().replaceAll("\\[|\\]",
""));
-                System.out.println("Options:");
-                for (CliOption op : CliOption.values())
-                    System.out.println("    -" + op.toString().toLowerCase() + (op.extraName
!= null ? ", " + op.extraName : ""));
-            }
+        return () -> {
+            System.out.println("Usage: ./bin/cassandra-stress help <command|option>");
+            System.out.println("Commands:");
+            for (Command cmd : Command.values())
+                System.out.println("    " + cmd.names.toString().replaceAll("\\[|\\]", ""));
+            System.out.println("Options:");
+            for (CliOption op : CliOption.values())
+                System.out.println("    -" + op.toString().toLowerCase() + (op.extraName
!= null ? ", " + op.extraName : ""));
         };
     }
 
     public static Runnable printHelpPrinter()
     {
-        return new Runnable()
+        return () -> GroupedOptions.printOptions(System.out, "print", new GroupedOptions()
         {
             @Override
-            public void run()
+            public List<? extends Option> options()
             {
-                GroupedOptions.printOptions(System.out, "print", new GroupedOptions()
-                {
-                    @Override
-                    public List<? extends Option> options()
-                    {
-                        return Arrays.asList(new OptionDistribution("dist=", null, "A mathematical
distribution"));
-                    }
-                });
+                return Arrays.asList(new OptionDistribution("dist=", null, "A mathematical
distribution"));
             }
-        };
+        });
     }
 
     public static Runnable sendToDaemonHelpPrinter()
     {
-        return new Runnable()
-        {
-            @Override
-            public void run()
-            {
-                System.out.println("Usage: -sendToDaemon <host>");
-                System.out.println();
-                System.out.println("Specify a host running the stress server to send this
stress command to");
-            }
+        return () -> {
+            System.out.println("Usage: -sendto <host>");
+            System.out.println();
+            System.out.println("Specify a host running the stress server to send this stress
command to");
         };
     }
 
@@ -212,7 +195,7 @@ public class SettingsMisc implements Serializable
         if (params.length != 1)
         {
             sendToDaemonHelpPrinter().run();
-            System.out.println("Invalid -send-to specifier: " + Arrays.toString(params));
+            System.out.println("Invalid -sendto specifier: " + Arrays.toString(params));
             System.exit(1);
         }
         return params[0];


Mime
View raw message