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

Jan Høydahl edited comment on SOLR-9194 at 6/16/16 9:07 PM:
------------------------------------------------------------

bq. Minor quibble: We should require a hyphen before the cp, as:
I hate that hyphen :-) It feels wrong, since it is really not an option but a 
command argument. I think it was technical limitations from SolrCLI.java which 
made it easiest to parse arguments that way?

So I'm more for removing the mandatory dash from up/downconfig (leaving the 
dash variant working for all of 6.x).

We then get this "man page" for {{solr zk}}
{noformat}
Usage: solr zk upconfig|downconfig -d <confdir> -n <configName> [-z zkHost]
       solr zk cp [-r] <src> <dest> [-z zkHost]
       solr zk rm [-r] <path> [-z zkHost]
       solr zk mv <src> <dest> [-z zkHost]

     upconfig uploads a configset from the local machine to Zookeeper. 
(Backcompat: -upconfig)

     downconfig downloads a configset from Zookeeper to the local machine. 
(Backcompat: -downconfig)

     cp copies files or folders to/from Zookeeper
        <src>, <dest> : [file:]/path/to/local/file or zk:/path/to/zk/node
                        When <src> is a zk resource, <dest> may be "."
                        If <dest> ends with "/", files are copied into that 
folder
                        Wildcards are not supported

     rm removes files or folders on Zookeeper
        <path>        : [zk:]/path/to/zk/node

     mv moves and/or renames files internally on Zookeeper

     -z zkHost        Zookeeper connection string. Only needed if not 
configured in solr.in.sh

     -r               Recursive copying

     -n configName    Name of the configset in Zookeeper that will be the 
destinatino of
                       'upconfig' and the source for 'downconfig'.

     -d confdir       The local directory the configuration will be uploaded 
from for
                      'upconfig' or downloaded to for 'downconfig'. For 
'upconfig', this
                      can be one of the example configsets, basic_configs, 
data_driven_schema_configs or
                      sample_techproducts_configs or an arbitrary directory.
{noformat}



was (Author: janhoy):
bq. Minor quibble: We should require a hyphen before the cp, as:
I hate that hyphen :-) It feels wrong, since it is really not an option but a 
command argument. I think it was technical limitations from SolrCLI.java which 
made it easiest to parse arguments that way?

So I'm more for removing the mandatory dash from up/downconfig (leaving the 
dash variant working for all of 6.x).

We then get this "man page" for {{solr zk}}
{noformat}
Usage: solr zk upconfig|downconfig -d <confdir> -n <configName> [-z zkHost]
       solr zk cp [-r] <src> <dest> [-z zkHost]
       solr zk rm [-r] <path> [-z zkHost]
       solr zk mv <src> <dest> [-z zkHost]

     upconfig uploads a configset from the local machine to Zookeeper. 
(Backcompat: -upconfig)

     downconfig downloads a configset from Zookeeper to the local machine. 
(Backcompat: -downconfig)

     cp copies files or folders to/from Zookeeper
        <src>, <dest> : [file:]/path/to/local/file or zk:/path/to/zk/node
                        When <src> is a zk resource, <dest> may be "."
                        If <dest> ends with "/", files are copied into that 
folder
                        Wildcards are not supported

     rm removes files or folders on Zookeeper
        <path>        : [zk:]/path/to/zk/node

     mv moves and/or renames files internally on Zookeeper

     -z zkHost        Zookeeper connection string.

     -r               Recursive copying

     -n configName    Name of the configset in Zookeeper that will be the 
destinatino of
                       'upconfig' and the source for 'downconfig'.

     -d confdir       The local directory the configuration will be uploaded 
from for
                      'upconfig' or downloaded to for 'downconfig'. For 
'upconfig', this
                      can be one of the example configsets, basic_configs, 
data_driven_schema_configs or
                      sample_techproducts_configs or an arbitrary directory.
{noformat}


> Enhance the bin/solr script to put and get arbitrary files to/from Zookeeper
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-9194
>                 URL: https://issues.apache.org/jira/browse/SOLR-9194
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>            Priority: Minor
>
> There are a few other files that can reasonably be pushed to Zookeeper, e.g. 
> solr.xml, security.json, clusterprops.json. Who knows? Even 
> <collection>/state.json for the brave.
> This could reduce further the need for bouncing out to zkcli.
> Assigning to myself just so I don't lose track, but I would _love_ it if 
> someone else wanted to take it...
> I'm thinking the commands would be 
> bin/solr zk -putfile -z <ensemble> -p <zookeeper path> -f <local file path>
> bin/solr zk -getfile -z <ensemble> -p <zookeeper path> -f <local file path>
> but I'm not wedded to those, all suggestions welcome.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to