lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "ZooKeeperIntegration" by NoblePaul
Date Wed, 02 Dec 2009 09:15:46 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "ZooKeeperIntegration" page has been changed by NoblePaul.
http://wiki.apache.org/solr/ZooKeeperIntegration?action=diff&rev1=9&rev2=10

--------------------------------------------------

  {{{
  <zookeeper>
      <!-- See the ZooKeeper docs -->
-     <str name="zkhostPorts">localhost:2181</str>
+     <str name="zkhostPorts">host1:2181,host2:2181,host3:2181</str>
      <!-- TODO: figure out how to do this programmatically -->
      <str name="me">http://host:port/solr/core1</str>
      <!-- Timeout for the ZooKeeper.  Optional.  Default 10000 -->
@@ -65, +65 @@

  == Master/Slave ==
  
  master/slave setup is only valid for !ReplicationHandler. So the configuration of master
node can be delegated to ReplicationHandler.
- --TODO--
+ 
+ The design of replication in this section is only valid if you use the standard solr.ReplicationHandler
. The configuration of ReplicationHandler would look as follows. 
+ 
+ {{{
+ <requestHandler name="/replication" class="solr.ReplicationHandler">
+     <lst name="master">
+       <str name="replicateAfter">commit</str>
+       <str name="confFiles">schema.xml,stopwords.txt,synonyms.txt</str>
+     </lst>
+     <lst name="slave">
+       <!-- Note that the 'masterUrl' attribute is missing. It has to be fetched from
Zookeeper-->
+       <str name="pollInterval">00:00:60</str>
+     </lst>
+     <lst name="zkSetup">
+        <str name="masterZnode">/solr_domain/shard1_master</str>
+        <bool name="masterCandidate">true</bool>        
+     </lst>
+   </requestHandler>
+ }}}
+ 
+ 
+ In this design the Zookeeper is used for [[http://hadoop.apache.org/zookeeper/docs/r3.2.1/recipes.html#sc_leaderElection
| leader election]]. When Solr starts up, the !ReplicationHandler , if mastercandidate=true
,gets the !ZookeeperComponent and gets hold of the Zookeeper client. It tries to become a
master by creating a znode (SEQUENTIAL|EPHEMERAL) under the 'masterZnode'. The instance which
succeeds in becoming the leader will be the master. All other nodes will treat this as the
master. if this node dies another leader is elected and that becomes the master.
+ 
+ The node created will store all the details : eg: master000000001=url=http://host:port/solr/cor1/replication,version=13254424,generation=5
+ 
+ === Other Replication Strategies ===
  
  NOTE COMPLETELY IMPLEMENTED YET.
  

Mime
View raw message