mirror of https://github.com/apache/lucene.git
SOLR-3789: Fix bug in SnapPuller that caused 'internal' compression to fail
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1381043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
21a9087986
commit
29012070bf
|
@ -113,6 +113,9 @@ Bug Fixes
|
|||
* SOLR-3611: We do not show ZooKeeper data in the UI for a node that has children.
|
||||
(Mark Miller)
|
||||
|
||||
* SOLR-3789: Fix bug in SnapPuller that caused "internal" compression to fail.
|
||||
(siren)
|
||||
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
|
|
@ -1151,7 +1151,7 @@ public class SnapPuller {
|
|||
params.set(FILE, fileName);
|
||||
}
|
||||
if (useInternal) {
|
||||
params.set(COMPRESSION, "internal");
|
||||
params.set(COMPRESSION, "true");
|
||||
}
|
||||
//use checksum
|
||||
if (this.includeChecksum) {
|
||||
|
|
|
@ -53,7 +53,8 @@
|
|||
<lst name="slave">
|
||||
<str name="masterUrl">http://localhost:TEST_PORT/solr</str>
|
||||
<str name="pollInterval">00:00:01</str>
|
||||
</lst>
|
||||
<str name="compression">COMPRESSION</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ import org.apache.lucene.store.SimpleFSDirectory;
|
|||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||
import org.apache.solr.BaseDistributedSearchTestCase;
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.TestDistributedSearch;
|
||||
import org.apache.solr.client.solrj.SolrServer;
|
||||
import org.apache.solr.client.solrj.SolrServerException;
|
||||
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
|
||||
|
@ -57,7 +56,6 @@ import org.apache.solr.common.util.SimpleOrderedMap;
|
|||
import org.apache.solr.util.AbstractSolrTestCase;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
|
||||
/**
|
||||
* Test for ReplicationHandler
|
||||
|
@ -928,13 +926,13 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
|
|||
|
||||
/* character copy of file using UTF-8 */
|
||||
private static void copyFile(File src, File dst) throws IOException {
|
||||
copyFile(src, dst, null);
|
||||
copyFile(src, dst, null, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* character copy of file using UTF-8. If port is non-null, will be substituted any time "TEST_PORT" is found.
|
||||
*/
|
||||
private static void copyFile(File src, File dst, Integer port) throws IOException {
|
||||
private static void copyFile(File src, File dst, Integer port, boolean internalCompression) throws IOException {
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(src), "UTF-8"));
|
||||
Writer out = new OutputStreamWriter(new FileOutputStream(dst), "UTF-8");
|
||||
|
||||
|
@ -942,6 +940,9 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
|
|||
|
||||
if (null != port)
|
||||
line = line.replace("TEST_PORT", port.toString());
|
||||
|
||||
line = line.replace("COMPRESSION", internalCompression?"internal":"false");
|
||||
|
||||
out.write(line);
|
||||
}
|
||||
in.close();
|
||||
|
@ -1020,10 +1021,9 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
|
|||
|
||||
public void copyConfigFile(String srcFile, String destFile)
|
||||
throws IOException {
|
||||
|
||||
copyFile(getFile(srcFile),
|
||||
new File(confDir, destFile),
|
||||
testPort);
|
||||
testPort, random().nextBoolean());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue