You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Brent <br...@gmail.com> on 2022/03/18 04:51:35 UTC

CLI parsing in ZK project(s)

Hi ZK devs,

I wanted to submit a pull request for "Add command line parameters support
for connection settings to ZooInspector" (
https://issues.apache.org/jira/browse/ZOOKEEPER-4487).

Looking around the rest of the project, I don't think I saw any command
line parsing libraries in use.  I suspect that's intentional, but to
confirm:

Am I allowed to include a CLI parsing library like
https://commons.apache.org/proper/commons-cli/?  Or if not, are there any
recommendations on the best way to do CLI parsing in this project?  It
looked like the MyCommandOptions class in
zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeperMain.java
might be a good starting point.

Thanks!

~Brent

Re: CLI parsing in ZK project(s)

Posted by Enrico Olivelli <eo...@gmail.com>.
Brent

Il giorno ven 18 mar 2022 alle ore 05:51 Brent
<br...@gmail.com> ha scritto:
>
> Hi ZK devs,
>
> I wanted to submit a pull request for "Add command line parameters support
> for connection settings to ZooInspector" (
> https://issues.apache.org/jira/browse/ZOOKEEPER-4487).
>
> Looking around the rest of the project, I don't think I saw any command
> line parsing libraries in use.  I suspect that's intentional, but to
> confirm:
>
> Am I allowed to include a CLI parsing library like
> https://commons.apache.org/proper/commons-cli/?  Or if not, are there any
> recommendations on the best way to do CLI parsing in this project?  It
> looked like the MyCommandOptions class in
> zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeperMain.java
> might be a good starting point.

Apache Commons CLI is good.
In other Apache projects (like BookKeeper) we use JCommander

Enrico

>
> Thanks!
>
> ~Brent