You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "ryan rawson (JIRA)" <ji...@apache.org> on 2010/02/16 01:50:27 UTC
[jira] Created: (HBASE-2229) convert all command line parsing to
jopt simple
convert all command line parsing to jopt simple
-----------------------------------------------
Key: HBASE-2229
URL: https://issues.apache.org/jira/browse/HBASE-2229
Project: Hadoop HBase
Issue Type: Bug
Reporter: ryan rawson
Priority: Minor
Fix For: 0.21.0
what we are doing right now is wonky, we should use jopt simple, which attempts to emulate ye olde classic opt parsers from C in their brevity and terseness.
http://jopt-simple.sourceforge.net/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-2229) convert all command line parsing to
jopt simple
Posted by "Kay Kay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-2229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834039#action_12834039 ]
Kay Kay commented on HBASE-2229:
--------------------------------
thanks stack / ryan. this is good to know.
> convert all command line parsing to jopt simple
> -----------------------------------------------
>
> Key: HBASE-2229
> URL: https://issues.apache.org/jira/browse/HBASE-2229
> Project: Hadoop HBase
> Issue Type: Bug
> Reporter: ryan rawson
> Priority: Minor
> Fix For: 0.21.0
>
>
> what we are doing right now is wonky, we should use jopt simple, which attempts to emulate ye olde classic opt parsers from C in their brevity and terseness.
> http://jopt-simple.sourceforge.net/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-2229) convert all command line parsing to
jopt simple
Posted by "Kay Kay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-2229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834034#action_12834034 ]
Kay Kay commented on HBASE-2229:
--------------------------------
out of curiosity - what are some of the plus-es in favor of jopt , as compared to commons-cli ?
> convert all command line parsing to jopt simple
> -----------------------------------------------
>
> Key: HBASE-2229
> URL: https://issues.apache.org/jira/browse/HBASE-2229
> Project: Hadoop HBase
> Issue Type: Bug
> Reporter: ryan rawson
> Priority: Minor
> Fix For: 0.21.0
>
>
> what we are doing right now is wonky, we should use jopt simple, which attempts to emulate ye olde classic opt parsers from C in their brevity and terseness.
> http://jopt-simple.sourceforge.net/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-2229) convert all command line parsing to
jopt simple
Posted by "ryan rawson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-2229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834038#action_12834038 ]
ryan rawson commented on HBASE-2229:
------------------------------------
Basically simplicity. Here is their well done example page:
http://jopt-simple.sourceforge.net/examples.html
Here is a compairson:
Options options = new Options();
options.addOption( OptionBuilder.withArgName("user")
.hasArg()
.isRequired()
.withDescription("user to use")
.create("user") );
// .. later ..
CommandLineParser clp = new GnuParser();
CommandLine line = clp.parse( opts, args );
// now read your arguments out of the 'line' object, eg:
String user = cl.getOptionValue("user");
Equivalent example in jopt-simple:
OptionParser parser = new OptionParser();
parser.accepts("user").withRequiredArg();
OptionSet options = parser.parse( args );
String user = options.valueOf("user");
/// Or if you are doing single character options:
OptionParser parser = new OptionParser( "u::" );
OptionSet options = parser.parse( args ) ;
String user = options.valueOf("user");
> convert all command line parsing to jopt simple
> -----------------------------------------------
>
> Key: HBASE-2229
> URL: https://issues.apache.org/jira/browse/HBASE-2229
> Project: Hadoop HBase
> Issue Type: Bug
> Reporter: ryan rawson
> Priority: Minor
> Fix For: 0.21.0
>
>
> what we are doing right now is wonky, we should use jopt simple, which attempts to emulate ye olde classic opt parsers from C in their brevity and terseness.
> http://jopt-simple.sourceforge.net/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HBASE-2229) convert all command line parsing to
jopt simple
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-2229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834037#action_12834037 ]
stack commented on HBASE-2229:
------------------------------
In my experience, you have to write reams of code in commons-cli to do a bit of simple command-line arg processing -- it seems way excessive.
> convert all command line parsing to jopt simple
> -----------------------------------------------
>
> Key: HBASE-2229
> URL: https://issues.apache.org/jira/browse/HBASE-2229
> Project: Hadoop HBase
> Issue Type: Bug
> Reporter: ryan rawson
> Priority: Minor
> Fix For: 0.21.0
>
>
> what we are doing right now is wonky, we should use jopt simple, which attempts to emulate ye olde classic opt parsers from C in their brevity and terseness.
> http://jopt-simple.sourceforge.net/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.