I uploaded a configuration folder for Solr core to Apache zookeeper using zkClient. When I delete a file in my local configuration and update it to Zookeeper again, I can't see the change reflected in Solr admin page. Could somebody please explain how to update/delete files from zookeeper? Also where to find the physical files in zookeeper folder?
5
votes
1 Answers
5
votes
In order to upload a modified file in zookeeper client, you need to:
- remove the old file from Zookeeper and
- upload the new one and
- restart the Solr nodes (depending on the change, you could reload the collection instead).
For instance if you need to update solrconfig.xml, you can: a) clear old file on zookeeper (otherwise depending from the client version you'll get an error):
zkcli.sh --zkhost <ZK_HOST>:<ZK_PORT> -cmd clear /configs/<MY_COLLECTION>/solrconfig.xml
b) upload the updated file:
zkcli.sh --zkhost <ZK_HOST>:<ZK_PORT> -cmd putfile /configs/<MY_COLLECTION>/solrconfig.xml /<MY_UPDATED_FILE_LOCAL_FOLDER>/solrconfig.xml
c) Restart the Solr nodes.
I believe your Solr files should be in /configs/<MY_COLLECTION>
.