Delete/remove Solr configuration from ZooKeeper using zkcli?
Solution 1
You missed the -z parameter which is mandatory (Zookeeper-3.4.8).
The correct command for deleting configset AAA on Solr (v.6.1.0) running on localhost with zookeeper on port 2181 is:
./server/scripts/cloud-scripts/zkcli.sh -cmd clear -z "localhost:2181" /configs/AAA
when in the root directory of Solr.
So to answer your question: Yes, you can use clear, and the path should be /configs/< name of configset >
Resources: https://cwiki.apache.org/confluence/display/solr/Command+Line+Utilities
Solution 2
From within your zookeeper bin directory, start zkCli.sh
, this will open zookeeper console.
Then fire the following command to delete a node/config:
rmr /configs
Related videos on Youtube
Comments
-
user2029783 almost 2 years
We have some old Solr configs in ZK and that we need to cleanup/delete.
The configs are at /configs/AAA, /configs/BBB, etc. (There are other configs under /configs as well.)
The Solr zkcli.sh script and docs provide no direction for deleting a config. The only thing that looks obvious is the "clear" parameter, but the docs and zkcli only give the example
-cmd clear /solr
. I thought./zkcli -cmd clear /configs/AAA
might work, but without being able to find much information on the internet, I'm leery of inadvertently deleting the wrong thing.If I want to delete the old configs, do I use clear, and if so, is the path parameter /configs/?
Thanks
-
Eric over 7 yearsBy the way, it's also possible to clear a single file within a config set. e.g
zkcli.sh -cmd clear -z localhost:2181 /configs/dummy/managed-schema.og