[ https://issues.apache.org/jira/browse/SOLR-561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Noble Paul updated SOLR-561: ---------------------------- Attachment: SOLR-561.patch The first cut. very crude , but worx .No OS specific commands The design for snapshoot , snappull is same as described in the design overview snapinstall is done the following way * write out a file index.properties in dataDirectory. * call commit command * The SolrCore is modified. A new method getNewIndexDir() is added. It loads the properties file (if exists, else fall back to the old behavior), read a property 'index' and return * Any new SolrIndexWriter, SolrIndexSearcher is loaded from the new index dir * Old ones continue to use the old index dir . getindexDir() returns the index dir used by the current SolrIndexReader/SolrIndexWriter Use the following configuration in master # register snapshooter {code:xml} <listener event="postCommit" class="solr.SnapShooter"> <bool name="wait">true</bool> </listener> {code} # register replication Handler {code:xml} <requestHandler name="/replication" class="solr.ReplicationHandler" /> {code} # register a new ResponseWriter {code:xml} <queryResponseWriter name="filestream" class="org.apache.solr.request.CustomBinaryResponseWriter"/> {code} In the Slave # register the replication handler {code:xml} <requestHandler name="/replication" class="solr.ReplicationHandler" > <str name="masterUrl">http://localhost:8080/solr/replication</str> <str name="pollInterval">00:00:30</str> </requestHandler> {code} > Solr replication by Solr (for windows also) > ------------------------------------------- > > Key: SOLR-561 > URL: https://issues.apache.org/jira/browse/SOLR-561 > Project: Solr > Issue Type: New Feature > Components: replication > Affects Versions: 1.3 > Environment: All > Reporter: Noble Paul > Attachments: SOLR-561.patch > > > The current replication strategy in solr involves shell scripts . The > following are the drawbacks with the approach > * It does not work with windows > * Replication works as a separate piece not integrated with solr. > * Cannot control replication from solr admin/JMX > * Each operation requires manual telnet to the host > Doing the replication in java has the following advantages > * Platform independence > * Manual steps can be completely eliminated. Everything can be driven from > solrconfig.xml . > ** Adding the url of the master in the slaves should be good enough to enable > replication. Other things like frequency of > snapshoot/snappull can also be configured . All other information can be > automatically obtained. > * Start/stop can be triggered from solr/admin or JMX > * Can get the status/progress while replication is going on. It can also > abort an ongoing replication > * No need to have a login into the machine > This issue can track the implementation of solr replication in java -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.