SOLR-1216

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@787212 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-06-22 12:05:54 +00:00
parent b33d055a08
commit f2343ea987
4 changed files with 9 additions and 7 deletions

View File

@ -241,6 +241,8 @@ New Features
61. SOLR-1214: differentiate between solr home and instanceDir .deprecates the method SolrResourceLoader#locateInstanceDir()
and it is renamed to locateSolrHome (noble)
62. SOLR-1216 : disambiguate the replication command names. 'snappull' becomes 'fetchindex' 'abortsnappull' becomes 'abortfetch' (noble)
Optimizations
----------------------
1. SOLR-374: Use IndexReader.reopen to save resources by re-using parts of the

View File

@ -129,7 +129,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
getFileList(solrParams, rsp);
} else if (command.equals(CMD_SNAP_SHOOT)) {
doSnapShoot(solrParams, rsp);
} else if (command.equals(CMD_SNAP_PULL)) {
} else if (command.equalsIgnoreCase(CMD_FETCH_INDEX)) {
new Thread() {
public void run() {
doSnapPull(solrParams);
@ -142,7 +142,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
} else if (command.equals(CMD_ENABLE_POLL)) {
if (snapPuller != null)
snapPuller.enablePoll();
} else if (command.equals(CMD_ABORT_SNAP_PULL)) {
} else if (command.equalsIgnoreCase(CMD_ABORT_FETCH)) {
if (snapPuller != null)
snapPuller.abortPull();
} else if (command.equals(CMD_FILE_CHECKSUM)) {
@ -945,9 +945,9 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
public static final String CMD_SNAP_SHOOT = "snapshoot";
public static final String CMD_SNAP_PULL = "snappull";
public static final String CMD_FETCH_INDEX = "fetchindex";
public static final String CMD_ABORT_SNAP_PULL = "abortsnappull";
public static final String CMD_ABORT_FETCH = "abortfetch";
public static final String CMD_GET_FILE_LIST = "filelist";

View File

@ -321,7 +321,7 @@ public class TestReplicationHandler extends TestCase {
assertEquals(500, masterQueryResult.getNumFound());
// snappull
String masterUrl = "http://localhost:" + slaveJetty.getLocalPort() + "/solr/replication?command=snappull&masterUrl=";
String masterUrl = "http://localhost:" + slaveJetty.getLocalPort() + "/solr/replication?command=fetchindex&masterUrl=";
masterUrl += "http://localhost:" + masterJetty.getLocalPort() + "/solr/replication";
URL url = new URL(masterUrl);
InputStream stream = url.openStream();

View File

@ -318,11 +318,11 @@ if (detailsMap != null)
String abortParam = request.getParameter("abort");
if (replicateParam != null)
if (replicateParam.equals("now")) {
executeCommand("snappull", solrcore, rh);
executeCommand("fetchindex", solrcore, rh);
}
if (abortParam != null)
if (abortParam.equals("stop")) {
executeCommand("abortsnappull", solrcore, rh);
executeCommand("abortfetch", solrcore, rh);
}
%>
</td>