Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clickhouse-keeper-client: add flag to allow rm & rmr command non-interactive #63980

Open
sanadhis opened this issue May 16, 2024 · 0 comments
Open
Labels

Comments

@sanadhis
Copy link

sanadhis commented May 16, 2024

I would like to be able to script the deletion of some trees/nodes in clickhouse-keeper
let's say using shell script:

nodes=(
    /clickhouse/tables/aabbcc/0/replicas/replica-0
    /clickhouse/tables/aabbcd/0/replicas/replica-0
    /clickhouse/tables/aabbce/0/replicas/replica-0
    /clickhouse/tables/aabbcf/0/replicas/replica-0
)
for node in "${nodes[@]}"
do
  echo "Deleting tree recursively"
  clickhouse-keeper-client -h ${keeper-client-host} -p 2181 -q "rmr $node"
done

problem is this is not possible now because rm & rmr commands are both interactive or requiring confirmation.

Would be awesome if we can have flag to make it non-interactive, such as rmr -y $node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant