-Re: Work on CLI
Henry Robinson 2012-02-27, 02:31
Hi Hartmut -
Great! Any improvements to the CLI are most welcome.
Compatibility *is* a concern; although I don't think we view the CLI as an
API that we have to maintain, we shouldn't go changing it without a good
reason. This applies really only to your proposal to change the syntax for
I would open a JIRA for each of the changes you want to work on, and we can
discuss their merits there. I've commented briefly on each proposal below.
On 24 February 2012 03:02, Hartmut Lang <[EMAIL PROTECTED]> wrote:
> i started to look into the CLI code of zookeeper, and think of making some
> contributions there.
> My ideas:
> - use commons-cli for option parsing (see:
Sounds good. Feel free to start work on this one!
> - switch to options instead of args: like -w instead of [watch] or -v
> version instead of [version]
> - use a -s option if you want to see Stat of a command
> - we could also do a "rm [-r]" instead of "delete" and "deleteall" (see:
> ZOOKEEPER-1326 <https://issues.apache.org/jira/browse/ZOOKEEPER-1326>)
This is probably ok, but the only potentially incompatible change. What's a
compelling reason for doing this?
> - order the result of a "ls" command
> - order the list of available commands
These sound fine. File a JIRA?
> - introduce own Class for every command, to be more flexible in adding
> removing commands
Yep, it would be nice to sort out that giant if-then-if-then block in
ZooKeeperMain. File a JIRA?
> To you think this could be a valid contribution to the project?
> What about compatibility? Is it important that all the "current" commands
> work in the same way?
> Some changes (like introducing [-v version] or [-w]) will not be backward
> Any comments welcome.