[ 
https://issues.apache.org/jira/browse/SOLR-17359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17885616#comment-17885616
 ] 

ASF subversion and git services commented on SOLR-17359:
--------------------------------------------------------

Commit d53fa22e857d4c82462bc59f16470ba50b5bf8fd in solr's branch 
refs/heads/branch_9x from Eric Pugh
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=d53fa22e857 ]

SOLR-17359: Move Zk Arg parsing into Java Code (#2593)

* Move Zk Arg parsing into Java Code from the bin/solr shell and bin/solr.cmd 
command scripts, making testing life easier on Windows.

* Improved the output of -h to make usage information look nicer

* restructure control flow so that we don't check for each script command by 
name and THEN call the java code, instead only look for the three exceptions, 
start, stop, restart.

* Resolve Executing a command incorrectly gives a message which is not clear. 
Eg: >solr zk ls

---------

Co-authored-by: Rahul Goswami <rahul.goswami0...@gmail.com>
(cherry picked from commit 463e093d336ff129e7b4fbe736cc3a2bb4725d39)


> Make SolrCLI handle arg parsing of zk sub commands
> --------------------------------------------------
>
>                 Key: SOLR-17359
>                 URL: https://issues.apache.org/jira/browse/SOLR-17359
>             Project: Solr
>          Issue Type: Sub-task
>          Components: scripts and tools
>            Reporter: Jan Høydahl
>            Assignee: Eric Pugh
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: main (10.0)
>
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> Both  bin/solr and bin/solr.cmd have lots of shell code to parse the zk sub 
> commands, and to print the usage text. We have both a short zk uage text and 
> the full one.
> {code:java}
> Usage: solr zk upconfig|downconfig -d <confdir> -n <configName> [-z zkHost] 
> [-s solrUrl]"
>        solr zk cp [-r] <src> <dest> [-z zkHost] [-s solrUrl]"
>        solr zk rm [-r] <path> [-z zkHost] [-s solrUrl]"
>        solr zk mv <src> <dest> [-z zkHost] [-s solrUrl]"
>        solr zk ls [-r] <path> [-z zkHost] [-s solrUrl]"
>        solr zk mkroot <path> [-z zkHost] [-s solrUrl]"
>        solr zk linkconfig --conf-name <confname> -c <collection> [-z zkHost] 
> [-s solrUrl]"
>        solr zk updateacls <path> [-z zkHost] [-s solrUrl]" {code}
> Extend SolrCLI and tools API to handle sub commands more natively so that 
> doing {{solr zk -h}} shows a list of sub commands, while `solr zk cp -h` 
> shows usage for that sub command.
> I think commons-cli does not have native subcommand support like e.g. 
> picocli, but it should be possible to implement..



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to