I am trying to set up a solrcloud/solr4.0.0-beta with multiple cores, multiple
shards, and a separate zookeeper process, but I think the exact details are
less important than the method of bootstrapping zookeeper with the
configs.Since I'm running zookeeper separately, I'd like to be able to version
solrcloud configs and drop them into zookeeper over time without necessarily
having to overwrite or immediately delete old ones.
After starting zookeeper using zkServer.sh start, I've been initially
bootstrapping it with:
java -Dsolr.solr.home=instance1 -Djetty.port=8501
-Djetty.home=$SOLR_HOME/solrcloud
-Dbootstrap_confdir=$SOLR_HOME/solrcloud/instance1/core0/conf
-Dcollection.configName=A01 -DnumShards=2 -DzkHost=localhost:2181 -jar start.jar
and then starting a second shard with:
java -Dsolr.solr.home=instance2 -Djetty.port=8502
-Djetty.home=$SOLR_HOME/solrcloud -Dcollection.configName=A01
-DzkHost=localhost:2181 -jar start.jar
hoping that "-Dcollection.configName=A01" would do what I think it should do :)
But if I then iterate on the "A01" config and bootstrap a new config "A02"
(stopping all instances of solr first) but don't delete anything from zookeeper:
java -Dsolr.solr.home=instance1 -Djetty.port=8501
-Djetty.home=$SOLR_HOME/solrcloud
-Dbootstrap_confdir=$SOLR_HOME/solrcloud/instance1/core0/conf
-Dcollection.configName=A02 -DnumShards=2 -DzkHost=localhost:2181 -jar start.jar
I see it upload the configs:
Aug 16, 2012 1:05:47 PM org.apache.solr.common.cloud.SolrZkClient makePathINFO:
makePath: /configs/A02/admin-extra.htmlAug 16, 2012 1:05:47 PM
org.apache.solr.common.cloud.SolrZkClient makePathINFO: makePath:
/configs/A02/admin-extra.menu-bottom.html
...
...so I had hoped it would use the given one in configName. Things seem to run
fine, but then if I do delete something from A01 to prove that it's using the
new config, I start to see error messages about things missing from A01 ...
showing me it's still using the old config:
(delete /configs/A01/admin-extra.html in zkCli)Aug 16, 2012 2:04:01 PM
org.apache.solr.common.SolrException logSEVERE:
org.apache.solr.common.SolrException: Can not find:
/configs/A01/admin-extra.html at
org.apache.solr.handler.admin.ShowFileRequestHandler.showFromZooKeeper(ShowFileRequestHandler.java:155)
at
org.apache.solr.handler.admin.ShowFileRequestHandler.handleRequestBody(ShowFileRequestHandler.java:120)on
the console running instance1
I'm sure I'm just missing something simple here, but I didn't see any reference
online about re-bootstrapping. I also tried this adding -Dbootstrap_conf=true
[1] to each but that didn't make a difference.
-Chaz
[1]
http://mail-archives.apache.org/mod_mbox/lucene-dev/201205.mbox/%3cbb7ad9bf-389b-4b94-8c1b-bbfc4028a...@gmail.com%3E