Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "SolrCloud" page has been changed by Mark Miller: http://wiki.apache.org/solr/SolrCloud?action=diff&rev1=29&rev2=30 Comment: you no longer need to pass numShards to often {{{ cd example2 - java -Djetty.port=7574 -DzkHost=localhost:9983 -DnumShards=2 -jar start.jar + java -Djetty.port=7574 -DzkHost=localhost:9983 -jar start.jar }}} * {{{-Djetty.port=7574}}} is just one way to tell the Jetty servlet container to use a different port. * {{{-DzkHost=localhost:9983}}} points to the Zookeeper ensemble containing the cluster state. In this example we're running a single Zookeeper server embedded in the first Solr server. By default, an embedded Zookeeper server runs at the Solr port plus 1000, so 9983. - * {{{-DnumShards=2}}} again, we need to specify the number of shards we want when a SolrCore is first started and registers in ZooKeeper. If you refresh the zookeeper browser, you should now see both shard1 and shard2 in collection1. View [[http://people.apache.org/~markrmiller/zk-example1.jpg|here]] if you are just reading along. @@ -90, +89 @@ {{{ cd exampleB - java -Djetty.port=8900 -DzkHost=localhost:9983 -DnumShards=2 -jar start.jar + java -Djetty.port=8900 -DzkHost=localhost:9983 -jar start.jar }}} {{{ cd example2B - java -Djetty.port=7500 -DzkHost=localhost:9983 -DnumShards=2 -jar start.jar + java -Djetty.port=7500 -DzkHost=localhost:9983 -jar start.jar }}} Refresh the zookeeper browser page [[http://localhost:8983/solr/admin/zookeeper.jsp|Solr Zookeeper Admin UI]] or [[http://localhost:8983/solr/#/cloud|new Solr Zookeeper Admin UI]] and verify that 4 solr nodes are up, and that each shard is present at 2 nodes. @@ -134, +133 @@ }}} {{{ cd example2 - java -Djetty.port=7574 -DzkRun -DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2 -jar start.jar + java -Djetty.port=7574 -DzkRun -DzkHost=localhost:9983,localhost:8574,localhost:9900 -jar start.jar }}} {{{ cd exampleB - java -Djetty.port=8900 -DzkRun -DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2 -jar start.jar + java -Djetty.port=8900 -DzkRun -DzkHost=localhost:9983,localhost:8574,localhost:9900 -jar start.jar }}} {{{ cd example2B - java -Djetty.port=7500 -DzkHost=localhost:9983,localhost:8574,localhost:9900 -DnumShards=2 -jar start.jar + java -Djetty.port=7500 -DzkHost=localhost:9983,localhost:8574,localhost:9900 -jar start.jar }}} Now since we are running three embedded zookeeper servers as an ensemble, everything can keep working even if a server is lost. To demonstrate this, kill the exampleB server by pressing CTRL+C in it's window and then browse to [[http://localhost:8983/solr/admin/zookeeper.jsp|Solr Zookeeper Admin UI]] or [[http://localhost:8983/solr/#/cloud|new Solr Zookeeper Admin UI]] to verify that the zookeeper service still works. @@ -213, +212 @@ == Parameter Reference == === Cluster Params === - || numShards || Defaults to ... || value || + || numShards || Defaults to 1 || value || === Node Params === || host || Defaults to the first local host address found || value ||
