10

How do I update an existing configuration file of SolrCloud in the Zoo Keeper?

I am using Solr4 Beta version with ZooKeeper 3.3.6. I have updated a configuration file, and restarted the Solr Instance which uploads the configuration file to the ZooKeeper. But when I check the configuration file from the SolrCloud Admin console, I don't see the updates. I am not able to understand if this is an issue with SolrCloud admin console or if I am not successful in uploading the config file to ZooKeeper.

Can someone who is familiar with ZooKeeper tell me on how to update an existing configuration file in the ZooKeeper, and how to verify the change in the ZooKeeper?

Ravi
  • 843
  • 2
  • 15
  • 31
  • 1
    Did you restart Solr with -Dbootstrap_conf=true option ? – Saurabh Saxena Nov 09 '12 at 00:57
  • Yes, the option is true. I had multiple cores defined in the instance and you would have to upload each configuration by changing -Dcollection.configName argument and restart the server every time. – Ravi Nov 26 '12 at 20:21

3 Answers3

6

Solr 4 comes with some helpful scripts

cloud-scripts/zkcli.sh -cmd upconfig -zkhost 127.0.0.1:2181 -d solr/your_default_collection_with_the_config/conf/ -n config_name_userd_by_all_collections

After that you have to reload cores.

Lukasz Kujawa
  • 3,026
  • 1
  • 28
  • 43
1

SolrCloud provides two option for uploading configuration files to ZK. If you have multiple cores while starting give option -Dbootstrap_conf=true. This will upload the index configuration files for all the cores. If you only want to upload configuration file of one core give two startup parameters -Dbootstrap_confdir and -Dcollection.configName.

Saurabh Saxena
  • 1,327
  • 2
  • 13
  • 26
-2

I had multiple cores defined in the instance. You would have to upload each configuration by changing -Dcollection.configName argument and restart the Solr instance every time

Ravi
  • 843
  • 2
  • 15
  • 31
  • Is it possible you could explain this more thoroughly? Do you change the Dcollection.configname to something new everytime? By restarting the server do you mean Zookeeper or the Solr instances? – CodeTower Nov 27 '12 at 10:01
  • No you don't change the Dcollection.configname to a new one everytime. In my case I have configurations setup for different environments like development, testing, uat. So if a change is made to the development configuration, you would have to point the Dcollection.configname to development. Restarting the server I mean , restarting the Solr instance not the ZooKeeper. – Ravi Nov 27 '12 at 15:51
  • You can reload the core without restarting. – kamaci Jan 31 '14 at 14:12