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.
|
* SOLR-3611: We do not show ZooKeeper data in the UI for a node that has children.
|
||||||
(Mark Miller)
|
(Mark Miller)
|
||||||
|
|
||||||
|
* SOLR-3789: Fix bug in SnapPuller that caused "internal" compression to fail.
|
||||||
|
(siren)
|
||||||
|
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
----------------------
|
----------------------
|
||||||
|
|
|
@ -1151,7 +1151,7 @@ public class SnapPuller {
|
||||||
params.set(FILE, fileName);
|
params.set(FILE, fileName);
|
||||||
}
|
}
|
||||||
if (useInternal) {
|
if (useInternal) {
|
||||||
params.set(COMPRESSION, "internal");
|
params.set(COMPRESSION, "true");
|
||||||
}
|
}
|
||||||
//use checksum
|
//use checksum
|
||||||
if (this.includeChecksum) {
|
if (this.includeChecksum) {
|
||||||
|
|
|
@ -53,7 +53,8 @@
|
||||||
<lst name="slave">
|
<lst name="slave">
|
||||||
<str name="masterUrl">http://localhost:TEST_PORT/solr</str>
|
<str name="masterUrl">http://localhost:TEST_PORT/solr</str>
|
||||||
<str name="pollInterval">00:00:01</str>
|
<str name="pollInterval">00:00:01</str>
|
||||||
</lst>
|
<str name="compression">COMPRESSION</str>
|
||||||
|
</lst>
|
||||||
</requestHandler>
|
</requestHandler>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ import org.apache.lucene.store.SimpleFSDirectory;
|
||||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||||
import org.apache.solr.BaseDistributedSearchTestCase;
|
import org.apache.solr.BaseDistributedSearchTestCase;
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.TestDistributedSearch;
|
|
||||||
import org.apache.solr.client.solrj.SolrServer;
|
import org.apache.solr.client.solrj.SolrServer;
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
import org.apache.solr.client.solrj.SolrServerException;
|
||||||
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
|
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.apache.solr.util.AbstractSolrTestCase;
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Ignore;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for ReplicationHandler
|
* Test for ReplicationHandler
|
||||||
|
@ -928,13 +926,13 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
/* character copy of file using UTF-8 */
|
/* character copy of file using UTF-8 */
|
||||||
private static void copyFile(File src, File dst) throws IOException {
|
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.
|
* 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"));
|
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(src), "UTF-8"));
|
||||||
Writer out = new OutputStreamWriter(new FileOutputStream(dst), "UTF-8");
|
Writer out = new OutputStreamWriter(new FileOutputStream(dst), "UTF-8");
|
||||||
|
|
||||||
|
@ -942,6 +940,9 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
if (null != port)
|
if (null != port)
|
||||||
line = line.replace("TEST_PORT", port.toString());
|
line = line.replace("TEST_PORT", port.toString());
|
||||||
|
|
||||||
|
line = line.replace("COMPRESSION", internalCompression?"internal":"false");
|
||||||
|
|
||||||
out.write(line);
|
out.write(line);
|
||||||
}
|
}
|
||||||
in.close();
|
in.close();
|
||||||
|
@ -1020,10 +1021,9 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
public void copyConfigFile(String srcFile, String destFile)
|
public void copyConfigFile(String srcFile, String destFile)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
copyFile(getFile(srcFile),
|
copyFile(getFile(srcFile),
|
||||||
new File(confDir, destFile),
|
new File(confDir, destFile),
|
||||||
testPort);
|
testPort, random().nextBoolean());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue