You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/09/14 03:30:27 UTC
[10/43] lucene-solr:jira/http2: SOLR-8742: In HdfsDirectoryTest
replace RAMDirectory usages with ByteBuffersDirectory.
SOLR-8742: In HdfsDirectoryTest replace RAMDirectory usages with ByteBuffersDirectory.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2c889229
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2c889229
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2c889229
Branch: refs/heads/jira/http2
Commit: 2c88922998ab3bc2e97d9c640bc01fd39d95fb34
Parents: 6fbcda6
Author: Steve Rowe <sa...@apache.org>
Authored: Fri Sep 7 13:19:01 2018 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Fri Sep 7 13:19:01 2018 -0400
----------------------------------------------------------------------
solr/CHANGES.txt | 3 +++
.../test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java | 7 +++----
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2c889229/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e5596e1..7d30c0c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -424,6 +424,9 @@ Other Changes
* SOLR-12744: Improve logging messages and verbosity around recoveries (Cao Manh Dat, Varun Thacker)
+* SOLR-8742: In HdfsDirectoryTest replace RAMDirectory usages with ByteBuffersDirectory.
+ (hossman, Mark Miller, Andrzej Bialecki, Steve Rowe)
+
================== 7.4.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2c889229/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
index 97b26fd..b9bd029 100644
--- a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
+++ b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
@@ -24,11 +24,11 @@ import java.util.Set;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.store.ByteBuffersDirectory;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.store.IndexOutput;
-import org.apache.lucene.store.RAMDirectory;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
@@ -140,9 +140,8 @@ public class HdfsDirectoryTest extends SolrTestCaseJ4 {
}
@Test
- // 12-Jun-2018 @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testEOF() throws IOException {
- Directory fsDir = new RAMDirectory();
+ Directory fsDir = new ByteBuffersDirectory();
String name = "test.eof";
createFile(name, fsDir, directory);
long fsLength = fsDir.fileLength(name);
@@ -168,7 +167,7 @@ public class HdfsDirectoryTest extends SolrTestCaseJ4 {
try {
Set<String> names = new HashSet<>();
for (; i< 10; i++) {
- Directory fsDir = new RAMDirectory();
+ Directory fsDir = new ByteBuffersDirectory();
String name = getName();
System.out.println("Working on pass [" + i +"] contains [" + names.contains(name) + "]");
names.add(name);