zookeeper-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andor Molnar (Jira)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-3646) Executing multiple commands non-interactively with the C client cli
Date Mon, 06 Jan 2020 11:58:00 GMT

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

Andor Molnar commented on ZOOKEEPER-3646:
-----------------------------------------

This would be a very nice for the Java client too.

> Executing multiple commands non-interactively with the C client cli
> -------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3646
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3646
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>            Reporter: Mate Szalay-Beko
>            Priority: Major
>
> With the current C CLI client, we can execute a single command, using the {{--cmd}} option.
>  However, when one wants to execute multiple commands in a session from a bash script,
he can not really do this now.
> The idea is to allow to execute a command file, where ZooKeeper C client CLI commands
are specified in each line. It would be also great to support to read the commands from the
standard input, so one is able to use standard unix pipes to channel commands to the zookeeper
client. This would allow more dynamic generation of commands from scripts.
> What about the following syntax?
> {code:bash}
> # execute a single command (this is working now)
> cli_mt --host localhost:2181 --cmd 'ls /zookeeper'
> # new: execute a list of commands specified in a file
> cli_mt --host localhost:2181 --cmd ./zk_commands.txt
> # new: read the commands from stdin 
> cat ./zk_commands.txt | cli_mt --host localhost:2181 --cmd
> {code}
> Or if it is easier / nicer, we can add a new parameter and not use {{--cmd}} for the
last two cases.
> Please assign the ticket to yourself if you start working on it (or leave a comment).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message