cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r902938 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/ClusterCmd.java
Date Mon, 25 Jan 2010 19:19:57 GMT
Author: eevans
Date: Mon Jan 25 19:19:56 2010
New Revision: 902938

URL: http://svn.apache.org/viewvc?rev=902938&view=rev
Log:
proper short and long arguments for clustertool

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/ClusterCmd.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/ClusterCmd.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/ClusterCmd.java?rev=902938&r1=902937&r2=902938&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/ClusterCmd.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/ClusterCmd.java Mon Jan
25 19:19:56 2010
@@ -32,8 +32,10 @@
  * JMX cluster wide operations for Cassandra.
  */
 public class ClusterCmd {
-    private static final String HOST_OPTION = "host";
-    private static final String PORT_OPTION = "port";
+    private static final String HOST_OPT_LONG = "host";
+    private static final String HOST_OPT_SHORT = "h";
+    private static final String PORT_OPT_LONG = "port";
+    private static final String PORT_OPT_SHORT = "p";
     private static final int defaultPort = 8080;
     private static Options options = null;
     private CommandLine cmd = null;
@@ -44,10 +46,10 @@
     static
     {
         options = new Options();
-        Option optHost = new Option(HOST_OPTION, true, "node hostname or ip address");
+        Option optHost = new Option(HOST_OPT_SHORT, HOST_OPT_LONG, true, "node hostname or
ip address");
         optHost.setRequired(true);
         options.addOption(optHost);
-        options.addOption(PORT_OPTION, true, "remote jmx agent port number");
+        options.addOption(PORT_OPT_SHORT, PORT_OPT_LONG, true, "remote jmx agent port number");
     }
 
     /**
@@ -60,9 +62,9 @@
     private ClusterCmd(String[] cmdArgs) throws ParseException, IOException, InterruptedException
     {
         parseArgs(cmdArgs);
-        this.host = cmd.getOptionValue(HOST_OPTION);
+        this.host = cmd.getOptionValue(HOST_OPT_SHORT);
 
-        String portNum = cmd.getOptionValue(PORT_OPTION);
+        String portNum = cmd.getOptionValue(PORT_OPT_SHORT);
         if (portNum != null)
         {
             try



Mime
View raw message