You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ee...@apache.org on 2010/01/25 20:19:57 UTC
svn commit: r902938 -
/incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/ClusterCmd.java
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