You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2011/05/13 10:50:15 UTC

[Solr Wiki] Update of "SolrReplication" by RobbieMackay

Dear Wiki user,

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

The "SolrReplication" page has been changed by RobbieMackay.
The comment on this change is: Move 'enable/disable master/slave in a node' to the configuration setting.
http://wiki.apache.org/solr/SolrReplication?action=diff&rev1=72&rev2=73

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

      </lst>
    </requestHandler>
  }}}
+ 
+ == enable/disable master/slave in a node ==
+ If a server needs to be turned into a master from a slave or if you wish to use the same solrconfig.xml for both master and slave, do as follows,
+ 
+ {{{
+ <requestHandler name="/replication" class="solr.ReplicationHandler" >
+   <lst name="master">
+     <str name="enable">${enable.master:false}</str>
+     <str name="replicateAfter">commit</str>
+     <str name="confFiles">schema.xml,stopwords.txt</str>
+  </lst>
+  <lst name="slave">
+     <str name="enable">${enable.slave:false}</str>
+    <str name="masterUrl">http://master_host:8983/solr/replication</str>
+    <str name="pollInterval">00:00:60</str>
+  </lst>
+ </requestHandler>
+ }}}
+ When the master is started, pass in -Denable.master=true and in the slave pass in -Denable.slave=true.  Alternately, these values can be stored in a solrcore.properties file as follows:
+ 
+ {{{
+ #solrcore.properties in master
+ enable.master=true
+ enable.slave=false
+ }}}
+ and in slave
+ 
+ {{{
+ #solrcore.properties in slave
+ enable.master=false
+ enable.slave=true
+ }}}
+ 
  = Replication Dashboard =
  This shows the following information
  
@@ -167, +200 @@

    * index files use an additional parameter {{{file=<index-filename>}}}, configuration files use an additional parameter {{{cf=<config-filename>}}} instead.
    * file contents are transferred in a custom stream format.
  
- == enable/disable master/slave in a node ==
- If a server needs to be turned into a master from a slave or if you wish to use the same solrconfig.xml for both master and slave, do as follows,
- 
- {{{
- <requestHandler name="/replication" class="solr.ReplicationHandler" >
-   <lst name="master">
-     <str name="enable">${enable.master:false}</str>
-     <str name="replicateAfter">commit</str>
-     <str name="confFiles">schema.xml,stopwords.txt</str>
-  </lst>
-  <lst name="slave">
-     <str name="enable">${enable.slave:false}</str>
-    <str name="masterUrl">http://master_host:8983/solr/replication</str>
-    <str name="pollInterval">00:00:60</str>
-  </lst>
- </requestHandler>
- }}}
- When the master is started, pass in -Denable.master=true and in the slave pass in -Denable.slave=true.  Alternately, these values can be stored in a solrcore.properties file as follows:
- 
- {{{
- #solrcore.properties in master
- enable.master=true
- enable.slave=false
- }}}
- and in slave
- 
- {{{
- #solrcore.properties in slave
- enable.master=false
- enable.slave=true
- }}}
  == Admin Page for Replication ==
  {{attachment:replication.png}}