From 3d4ca81c29a27db3df6b45acefbd45c3466fd210 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Thu, 25 Oct 2012 19:22:45 +0200 Subject: [PATCH] remove XIndexWriter removing the buffered deletes bloom filter no longer requires setting the bloom filter on it --- .../org/apache/lucene/index/XIndexWriter.java | 29 ------------------- .../index/engine/robin/RobinEngine.java | 2 +- 2 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 src/main/java/org/apache/lucene/index/XIndexWriter.java diff --git a/src/main/java/org/apache/lucene/index/XIndexWriter.java b/src/main/java/org/apache/lucene/index/XIndexWriter.java deleted file mode 100644 index 72f052a8259..00000000000 --- a/src/main/java/org/apache/lucene/index/XIndexWriter.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.apache.lucene.index; - -import org.apache.lucene.store.Directory; -import org.apache.lucene.store.LockObtainFailedException; -import org.elasticsearch.common.logging.ESLogger; -import org.elasticsearch.index.cache.bloom.BloomCache; - -import java.io.IOException; - -/** - */ -public class XIndexWriter extends IndexWriter { - - private final ESLogger logger; - - public XIndexWriter(Directory d, IndexWriterConfig conf, ESLogger logger, BloomCache bloomCache) throws CorruptIndexException, LockObtainFailedException, IOException { - super(d, conf); - this.logger = logger; - if (bufferedDeletesStream instanceof XBufferedDeletesStream) { - logger.debug("using bloom filter enhanced delete handling"); - ((XBufferedDeletesStream) bufferedDeletesStream).setBloomCache(bloomCache); - } - } - - public static interface XBufferedDeletesStream { - - void setBloomCache(BloomCache bloomCache); - } -} diff --git a/src/main/java/org/elasticsearch/index/engine/robin/RobinEngine.java b/src/main/java/org/elasticsearch/index/engine/robin/RobinEngine.java index 872a1862777..b52dbb878a8 100644 --- a/src/main/java/org/elasticsearch/index/engine/robin/RobinEngine.java +++ b/src/main/java/org/elasticsearch/index/engine/robin/RobinEngine.java @@ -1362,7 +1362,7 @@ public class RobinEngine extends AbstractIndexShardComponent implements Engine { config.setReaderTermsIndexDivisor(termIndexDivisor); config.setMaxThreadStates(indexConcurrency); - indexWriter = new XIndexWriter(store.directory(), config, logger, bloomCache); + indexWriter = new IndexWriter(store.directory(), config); } catch (IOException e) { safeClose(indexWriter); throw e;