How can I delete a data node which is not empty in zookeeper?
Asked Answered
W

3

27

For deleting a node in zookeeper from command line interface there is a delete command. When I run it, it says:

Node not empty: /testNode

I am using this guide.

Whinny answered 8/12, 2015 at 10:38 Comment(0)
I
57

The zkCli provides the rmr (deprecated) or deleteall command for this purpose. It will recursively delete all nodes under the path. This command did not appear until version 3.4.0. The documentation link you provided is for version 3.3.3.

Ind answered 17/12, 2015 at 0:53 Comment(0)
O
1

deleteall nodeName

For example: deleteall /hbase works for me in hbase 2.4.1

Octodecillion answered 1/12, 2022 at 3:34 Comment(0)
D
0

I use the following command in Java:

zkClient.deleteRecursive(ZkUtils.getTopicPath(topicName));

Depute answered 12/8, 2019 at 22:28 Comment(1)
Looks like the same does Zk Cli according to org.apache.zookeeper.cli.DeleteAllCommand#execArst

© 2022 - 2024 — McMap. All rights reserved.