incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/3] git commit: Fixing a bug in the blur simple index writer that causes index readers that have been released to not delete the unused files from the index writer. Also the writer will close after becoming idle for 30 seconds.
Date Wed, 18 Nov 2015 15:11:45 GMT
Fixing a bug in the blur simple index writer that causes index readers that have been released
to not delete the unused files from the index writer.  Also the writer will close after becoming
idle for 30 seconds.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/805e3c53
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/805e3c53
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/805e3c53

Branch: refs/heads/master
Commit: 805e3c539737a24a8984419447b88e9b57554c92
Parents: 5fb575a
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Nov 18 10:11:17 2015 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Nov 18 10:11:17 2015 -0500

----------------------------------------------------------------------
 .../indexserver/DistributedIndexServer.java     |   9 +-
 .../manager/indexserver/LocalIndexServer.java   |  46 +++---
 .../apache/blur/manager/writer/BlurIndex.java   |   2 +-
 .../blur/manager/writer/BlurIndexCloser.java    |  15 +-
 .../blur/manager/writer/BlurIndexReadOnly.java  |   3 +-
 .../manager/writer/BlurIndexSimpleWriter.java   | 158 +++++++++----------
 .../blur/manager/writer/IndexImporter.java      |   9 +-
 .../org/apache/blur/server/TableContext.java    |   7 +-
 .../blur/thrift/ThriftBlurShardServer.java      |   6 +-
 .../blur/command/ShardCommandManagerTest.java   |  10 +-
 .../blur/command/stream/StreamServerTest.java   |   2 +-
 .../apache/blur/manager/IndexManagerTest.java   |  10 +-
 .../writer/BlurIndexSimpleWriterTest.java       |  38 ++++-
 .../blur/manager/writer/IndexImporterTest.java  |   4 +-
 .../org/apache/blur/thrift/BlurMutationBug.java |   6 +
 .../blur/index/IndexDeletionPolicyReader.java   |   4 +
 .../org/apache/blur/utils/BlurConstants.java    |   1 +
 .../src/main/resources/blur-default.properties  |   3 +
 18 files changed, 186 insertions(+), 147 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
index 6972abb..c6878d5 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
@@ -119,8 +119,10 @@ public class DistributedIndexServer extends AbstractDistributedIndexServer
{
   private final Timer _hdfsKeyValueTimer;
   private final Timer _indexImporterTimer;
   private final Timer _indexBulkTimer;
+  private final Timer _indexIdleWriterTimer;
   private final ThriftCache _thriftCache;
   private final SequentialReadControl _sequentialReadControl;
+  private final long _maxWriterIdle;
 
   public DistributedIndexServer(Configuration configuration, ZooKeeper zookeeper, ClusterStatus
clusterStatus,
       BlurFilterCache filterCache, BlockCacheDirectoryFactory blockCacheDirectoryFactory,
@@ -128,8 +130,11 @@ public class DistributedIndexServer extends AbstractDistributedIndexServer
{
       int shardOpenerThreadCount, int maxMergeThreads, int internalSearchThreads,
       int minimumNumberOfNodesBeforeExitingSafeMode, Timer hdfsKeyValueTimer, Timer indexImporterTimer,
       long smallMergeThreshold, Timer indexBulkTimer, ThriftCache thriftCache,
-      SequentialReadControl sequentialReadControl) throws KeeperException, InterruptedException
{
+      SequentialReadControl sequentialReadControl, Timer indexIdleWriterTimer, long maxWriterIdle)
+      throws KeeperException, InterruptedException {
     super(clusterStatus, configuration, nodeName, cluster);
+    _indexIdleWriterTimer = indexIdleWriterTimer;
+    _maxWriterIdle = maxWriterIdle;
     _sequentialReadControl = sequentialReadControl;
     _indexImporterTimer = indexImporterTimer;
     _indexBulkTimer = indexBulkTimer;
@@ -522,7 +527,7 @@ public class DistributedIndexServer extends AbstractDistributedIndexServer
{
     }
 
     BlurIndex index = tableContext.newInstanceBlurIndex(shardContext, directory, _mergeScheduler,
_searchExecutor,
-        _indexCloser, _indexImporterTimer, _indexBulkTimer, _thriftCache);
+        _indexCloser, _indexImporterTimer, _indexBulkTimer, _thriftCache, _indexIdleWriterTimer,
_maxWriterIdle);
 
     if (_clusterStatus.isReadOnly(true, _cluster, table)) {
       index = new BlurIndexReadOnly(index);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
b/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
index fde7b35..9470d15 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
@@ -16,8 +16,6 @@ package org.apache.blur.manager.indexserver;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-
 import java.io.Closeable;
 import java.io.File;
 import java.io.IOException;
@@ -31,6 +29,7 @@ import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.blur.log.Log;
 import org.apache.blur.log.LogFactory;
@@ -40,19 +39,18 @@ import org.apache.blur.manager.writer.BlurIndexSimpleWriter;
 import org.apache.blur.manager.writer.SharedMergeScheduler;
 import org.apache.blur.server.ShardContext;
 import org.apache.blur.server.TableContext;
+import org.apache.blur.store.hdfs.BlurLockFactory;
+import org.apache.blur.store.hdfs.HdfsDirectory;
 import org.apache.blur.thrift.generated.ShardState;
 import org.apache.blur.thrift.generated.TableDescriptor;
 import org.apache.blur.utils.BlurConstants;
+import org.apache.blur.utils.BlurUtil;
 import org.apache.blur.utils.ShardUtil;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.lucene.analysis.core.KeywordAnalyzer;
 import org.apache.lucene.index.CorruptIndexException;
-import org.apache.lucene.index.DirectoryReader;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.MMapDirectory;
-import org.apache.lucene.store.RAMDirectory;
 
 import com.google.common.io.Closer;
 
@@ -65,24 +63,22 @@ public class LocalIndexServer extends AbstractIndexServer {
   private final ExecutorService _searchExecutor;
   private final TableContext _tableContext;
   private final Closer _closer;
-  private final boolean _ramDir;
   private final BlurIndexCloser _indexCloser;
   private final Timer _timer;
   private final Timer _bulkTimer;
+  private final Timer _closerTimer;
+  private final long _maxWriterIdle;
 
   public LocalIndexServer(TableDescriptor tableDescriptor) throws IOException {
-    this(tableDescriptor, false);
-  }
-
-  public LocalIndexServer(TableDescriptor tableDescriptor, boolean ramDir) throws IOException
{
     _timer = new Timer("Index Importer", true);
     _bulkTimer = new Timer("Bulk Indexing", true);
+    _closerTimer = new Timer("Writer Closer", true);
+    _maxWriterIdle = TimeUnit.SECONDS.toMillis(30);
     _closer = Closer.create();
     _tableContext = TableContext.create(tableDescriptor);
     _mergeScheduler = _closer.register(new SharedMergeScheduler(3, 128 * 1000 * 1000));
     _searchExecutor = Executors.newCachedThreadPool();
     _closer.register(new CloseableExecutorService(_searchExecutor));
-    _ramDir = ramDir;
     _indexCloser = _closer.register(new BlurIndexCloser());
     _closer.register(new Closeable() {
       @Override
@@ -141,23 +137,17 @@ public class LocalIndexServer extends AbstractIndexServer {
   private Map<String, BlurIndex> openFromDisk() throws IOException {
     String table = _tableContext.getDescriptor().getName();
     Path tablePath = _tableContext.getTablePath();
-    File tableFile = new File(tablePath.toUri());
-    if (tableFile.isDirectory()) {
+    Configuration configuration = _tableContext.getConfiguration();
+    FileSystem fileSystem = tablePath.getFileSystem(configuration);
+    if (fileSystem.isDirectory(tablePath)) {
       Map<String, BlurIndex> shards = new ConcurrentHashMap<String, BlurIndex>();
       int shardCount = _tableContext.getDescriptor().getShardCount();
       for (int i = 0; i < shardCount; i++) {
-        Directory directory;
         String shardName = ShardUtil.getShardName(BlurConstants.SHARD_PREFIX, i);
-        if (_ramDir) {
-          directory = new RAMDirectory();
-        } else {
-          File file = new File(tableFile, shardName);
-          file.mkdirs();
-          directory = new MMapDirectory(file);
-        }
-        if (!DirectoryReader.indexExists(directory)) {
-          new IndexWriter(directory, new IndexWriterConfig(LUCENE_VERSION, new KeywordAnalyzer())).close();
-        }
+        Path hdfsPath = new Path(tablePath, shardName);
+        Directory directory = new HdfsDirectory(configuration, hdfsPath);
+        BlurLockFactory lockFactory = new BlurLockFactory(configuration, hdfsPath, getNodeName(),
BlurUtil.getPid());
+        directory.setLockFactory(lockFactory);
         shards.put(shardName, openIndex(table, shardName, directory));
       }
       return shards;
@@ -168,7 +158,7 @@ public class LocalIndexServer extends AbstractIndexServer {
   private BlurIndex openIndex(String table, String shard, Directory dir) throws CorruptIndexException,
IOException {
     ShardContext shardContext = ShardContext.create(_tableContext, shard);
     BlurIndexSimpleWriter index = new BlurIndexSimpleWriter(shardContext, dir, _mergeScheduler,
_searchExecutor,
-        _indexCloser, _timer, _bulkTimer, null);
+        _indexCloser, _timer, _bulkTimer, null, _closerTimer, _maxWriterIdle);
     return index;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
index 3858744..aac5a86 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
@@ -43,7 +43,7 @@ public abstract class BlurIndex {
 
   public BlurIndex(ShardContext shardContext, Directory directory, SharedMergeScheduler mergeScheduler,
       ExecutorService searchExecutor, BlurIndexCloser indexCloser, Timer indexImporterTimer,
Timer bulkIndexingTimer,
-      ThriftCache thriftCache) throws IOException {
+      ThriftCache thriftCache, Timer indexWriterTimer, long maxWriterIdle) throws IOException
{
     _shardContext = shardContext;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexCloser.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexCloser.java b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexCloser.java
index f3aa777..31609f8 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexCloser.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexCloser.java
@@ -29,16 +29,15 @@ import org.apache.blur.log.Log;
 import org.apache.blur.log.LogFactory;
 import org.apache.lucene.index.IndexReader;
 
-
 public class BlurIndexCloser implements Runnable, Closeable {
 
   private static final Log LOG = LogFactory.getLog(BlurIndexCloser.class);
   private static final long PAUSE_TIME = TimeUnit.SECONDS.toMillis(1);
-  private Thread daemon;
-  private Collection<IndexReader> readers = new LinkedBlockingQueue<IndexReader>();
-  private AtomicBoolean running = new AtomicBoolean();
-  private ExecutorService executorService;
-  
+  private final Thread daemon;
+  private final Collection<IndexReader> readers = new LinkedBlockingQueue<IndexReader>();
+  private final AtomicBoolean running = new AtomicBoolean();
+  private final ExecutorService executorService;
+
   public BlurIndexCloser() {
     running.set(true);
     daemon = new Thread(this);
@@ -49,6 +48,10 @@ public class BlurIndexCloser implements Runnable, Closeable {
     executorService = Executors.newThreadPool("Blur Index Closer Pool", 10);
   }
 
+  public int getReadersToBeClosedCount() {
+    return readers.size();
+  }
+
   public void close() {
     running.set(false);
     daemon.interrupt();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
index ab64415..c0b6ada 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
@@ -18,6 +18,7 @@ package org.apache.blur.manager.writer;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.blur.lucene.search.IndexSearcherCloseable;
@@ -28,7 +29,7 @@ public class BlurIndexReadOnly extends BlurIndex {
   private final BlurIndex _blurIndex;
 
   public BlurIndexReadOnly(BlurIndex blurIndex) throws IOException {
-    super(null, null, null, null, null, null, null, null);
+    super(null, null, null, null, null, null, null, null, null, 0);
     _blurIndex = blurIndex;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
index 7cc823a..1570362 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
@@ -44,6 +44,7 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
@@ -146,17 +147,21 @@ public class BlurIndexSimpleWriter extends BlurIndex {
   private final TimerTask _watchForIdleBulkWriters;
   private final ThriftCache _thriftCache;
   private final String _defaultReadMaskMessage;
+  private final IndexImporter _indexImporter;
+  private final Timer _indexWriterTimer;
+  private final AtomicLong _lastWrite = new AtomicLong();
+  private final long _maxWriterIdle;
+  private final TimerTask _watchForIdleWriter;
 
-  private Thread _optimizeThread;
-  private Thread _writerOpener;
-  private IndexImporter _indexImporter;
+  private volatile Thread _optimizeThread;
 
   public BlurIndexSimpleWriter(ShardContext shardContext, Directory directory, SharedMergeScheduler
mergeScheduler,
       final ExecutorService searchExecutor, BlurIndexCloser indexCloser, Timer indexImporterTimer,
-      Timer bulkIndexingTimer, ThriftCache thriftCache) throws IOException {
+      Timer bulkIndexingTimer, ThriftCache thriftCache, Timer indexWriterTimer, long maxWriterIdle)
throws IOException {
     super(shardContext, directory, mergeScheduler, searchExecutor, indexCloser, indexImporterTimer,
bulkIndexingTimer,
-        thriftCache);
-
+        thriftCache, indexWriterTimer, maxWriterIdle);
+    _maxWriterIdle = maxWriterIdle;
+    _indexWriterTimer = indexWriterTimer;
     _thriftCache = thriftCache;
     _commaSplitter = Splitter.on(',');
     _bulkWriters = new ConcurrentHashMap<String, BlurIndexSimpleWriter.BulkEntry>();
@@ -215,7 +220,9 @@ public class BlurIndexSimpleWriter extends BlurIndex {
     DirectoryReader directoryReader = checkForMemoryLeaks(wrappped, message);
     _indexReader.set(directoryReader);
 
-    openWriter();
+    _indexImporter = new IndexImporter(_indexImporterTimer, BlurIndexSimpleWriter.this, _shardContext,
+        TimeUnit.SECONDS, 10, 120, _thriftCache, _directory);
+
     _watchForIdleBulkWriters = new TimerTask() {
       @Override
       public void run() {
@@ -238,6 +245,17 @@ public class BlurIndexSimpleWriter extends BlurIndex {
     };
     long delay = TimeUnit.SECONDS.toMillis(30);
     _bulkIndexingTimer.schedule(_watchForIdleBulkWriters, delay, delay);
+    _watchForIdleWriter = new TimerTask() {
+      @Override
+      public void run() {
+        closeWriter();
+      }
+    };
+    _indexWriterTimer.schedule(_watchForIdleWriter, _maxWriterIdle, _maxWriterIdle);
+  }
+
+  public int getReaderGenerationCount() {
+    return _policy.getReaderGenerationCount();
   }
 
   private String getDefaultReadMaskMessage(TableContext tableContext) {
@@ -268,22 +286,6 @@ public class BlurIndexSimpleWriter extends BlurIndex {
     }
   }
 
-  private synchronized void openWriter() {
-    IOUtils.cleanup(LOG, _indexImporter);
-    BlurIndexWriter writer = _writer.get();
-    if (writer != null) {
-      try {
-        writer.close(false);
-      } catch (IOException e) {
-        LOG.error("Unknown error while trying to close the writer, [" + _shardContext.getTableContext().getTable()
-            + "] Shard [" + _shardContext.getShard() + "]", e);
-      }
-      _writer.set(null);
-    }
-    _writerOpener = getWriterOpener(_shardContext);
-    _writerOpener.start();
-  }
-
   private DirectoryReader wrap(DirectoryReader reader) throws IOException {
     if (_makeReaderExitable) {
       reader = new ExitableReader(reader);
@@ -291,29 +293,6 @@ public class BlurIndexSimpleWriter extends BlurIndex {
     return _policy.register(reader);
   }
 
-  private Thread getWriterOpener(ShardContext shardContext) {
-    Thread thread = new Thread(new Runnable() {
-
-      @Override
-      public void run() {
-        try {
-          _writer.set(new BlurIndexWriter(_directory, _conf.clone()));
-          synchronized (_writer) {
-            _writer.notify();
-          }
-          _indexImporter = new IndexImporter(_indexImporterTimer, BlurIndexSimpleWriter.this,
_shardContext,
-              TimeUnit.SECONDS, 10, _thriftCache, _directory);
-        } catch (IOException e) {
-          LOG.error("Unknown error on index writer open.", e);
-        }
-      }
-    });
-    thread.setName("Writer Opener for Table [" + shardContext.getTableContext().getTable()
+ "] Shard ["
-        + shardContext.getShard() + "]");
-    thread.setDaemon(true);
-    return thread;
-  }
-
   @Override
   public IndexSearcherCloseable getIndexSearcher() throws IOException {
     return getIndexSearcher(_security);
@@ -413,26 +392,11 @@ public class BlurIndexSimpleWriter extends BlurIndex {
     };
   }
 
-  private void waitUntilNotNull(AtomicReference<?> ref) {
-    while (true) {
-      Object object = ref.get();
-      if (object != null) {
-        return;
-      }
-      synchronized (ref) {
-        try {
-          ref.wait(TimeUnit.SECONDS.toMillis(1));
-        } catch (InterruptedException e) {
-          return;
-        }
-      }
-    }
-  }
-
   @Override
   public void close() throws IOException {
     _isClosed.set(true);
-    IOUtils.cleanup(LOG, makeCloseable(_watchForIdleBulkWriters), _indexImporter, _mutationQueueProcessor,
+    IOUtils.cleanup(LOG, makeCloseable(_bulkIndexingTimer, _watchForIdleBulkWriters),
+        makeCloseable(_indexWriterTimer, _watchForIdleWriter), _indexImporter, _mutationQueueProcessor,
         makeCloseable(_writer.get()), _indexReader.get(), _directory);
   }
 
@@ -447,12 +411,12 @@ public class BlurIndexSimpleWriter extends BlurIndex {
     };
   }
 
-  private Closeable makeCloseable(final TimerTask timerTask) {
+  private Closeable makeCloseable(Timer timer, final TimerTask timerTask) {
     return new Closeable() {
       @Override
       public void close() throws IOException {
         timerTask.cancel();
-        _bulkIndexingTimer.purge();
+        timer.purge();
       }
     };
   }
@@ -467,6 +431,48 @@ public class BlurIndexSimpleWriter extends BlurIndex {
     return _isClosed;
   }
 
+  private void closeWriter() {
+    if (_lastWrite.get() + _maxWriterIdle < System.currentTimeMillis()) {
+      synchronized (_writer) {
+        _writeLock.lock();
+        try {
+          BlurIndexWriter writer = _writer.getAndSet(null);
+          if (writer != null) {
+            LOG.info("Closing idle writer for table [{0}] shard [{1}]", _tableContext.getTable(),
+                _shardContext.getShard());
+            IOUtils.cleanup(LOG, writer);
+          }
+        } finally {
+          _writeLock.unlock();
+        }
+      }
+    }
+  }
+
+  protected boolean isWriterClosed() {
+    synchronized (_writer) {
+      return _writer.get() == null;
+    }
+  }
+
+  private BlurIndexWriter getBlurIndexWriter() throws IOException {
+    synchronized (_writer) {
+      BlurIndexWriter blurIndexWriter = _writer.get();
+      if (blurIndexWriter == null) {
+        blurIndexWriter = new BlurIndexWriter(_directory, _conf.clone());
+        _writer.set(blurIndexWriter);
+        _lastWrite.set(System.currentTimeMillis());
+      }
+      return blurIndexWriter;
+    }
+  }
+
+  private void resetBlurIndexWriter() {
+    synchronized (_writer) {
+      _writer.set(null);
+    }
+  }
+
   @Override
   public synchronized void optimize(final int numberOfSegmentsPerShard) throws IOException
{
     final String table = _tableContext.getTable();
@@ -479,8 +485,7 @@ public class BlurIndexSimpleWriter extends BlurIndex {
       @Override
       public void run() {
         try {
-          waitUntilNotNull(_writer);
-          BlurIndexWriter writer = _writer.get();
+          BlurIndexWriter writer = getBlurIndexWriter();
           writer.forceMerge(numberOfSegmentsPerShard, true);
           _writeLock.lock();
           try {
@@ -525,8 +530,7 @@ public class BlurIndexSimpleWriter extends BlurIndex {
 
   private void commit() throws IOException {
     Tracer trace1 = Trace.trace("prepareCommit");
-    waitUntilNotNull(_writer);
-    BlurIndexWriter writer = _writer.get();
+    BlurIndexWriter writer = getBlurIndexWriter();
     writer.prepareCommit();
     trace1.done();
 
@@ -549,27 +553,18 @@ public class BlurIndexSimpleWriter extends BlurIndex {
       } finally {
         _indexRefreshWriteLock.unlock();
       }
-      _indexCloser.close(getRealReader(currentReader));
+      _indexCloser.close(currentReader);
     }
     trace3.done();
   }
 
-  private IndexReader getRealReader(DirectoryReader reader) {
-    if (reader instanceof ExitableReader) {
-      ExitableReader exitableReader = (ExitableReader) reader;
-      return getRealReader(exitableReader.getIn());
-    }
-    return reader;
-  }
-
   @Override
   public void process(IndexAction indexAction) throws IOException {
     _writesWaiting.incrementAndGet();
     _writeLock.lock();
     _writesWaiting.decrementAndGet();
     indexAction.setWritesWaiting(_writesWaiting);
-    waitUntilNotNull(_writer);
-    BlurIndexWriter writer = _writer.get();
+    BlurIndexWriter writer = getBlurIndexWriter();
     IndexSearcherCloseable indexSearcher = null;
     try {
       indexSearcher = getIndexSearcher(false);
@@ -580,7 +575,7 @@ public class BlurIndexSimpleWriter extends BlurIndex {
     } catch (Exception e) {
       indexAction.doPreRollback(writer);
       writer.rollback();
-      openWriter();
+      resetBlurIndexWriter();
       indexAction.doPostRollback(writer);
       throw new IOException("Unknown error during mutation", e);
     } finally {
@@ -590,6 +585,7 @@ public class BlurIndexSimpleWriter extends BlurIndex {
       if (indexSearcher != null) {
         indexSearcher.close();
       }
+      _lastWrite.set(System.currentTimeMillis());
       _writeLock.unlock();
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/main/java/org/apache/blur/manager/writer/IndexImporter.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/IndexImporter.java b/blur-core/src/main/java/org/apache/blur/manager/writer/IndexImporter.java
index 4a79675..c69c71b 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/IndexImporter.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/IndexImporter.java
@@ -85,15 +85,16 @@ public class IndexImporter extends TimerTask implements Closeable {
   private long _lastCleanup;
   private Runnable _testError;
 
-  public IndexImporter(Timer indexImporterTimer, BlurIndex blurIndex, ShardContext shardContext,
TimeUnit refreshUnit,
-      long refreshAmount, ThriftCache thriftCache, Directory dir) throws IOException {
+  public IndexImporter(Timer indexImporterTimer, BlurIndex blurIndex, ShardContext shardContext,
TimeUnit timeUnit,
+      long refreshAmount, long initalWaitTime, ThriftCache thriftCache, Directory dir) throws
IOException {
     _thriftCache = thriftCache;
     _blurIndex = blurIndex;
     _shardContext = shardContext;
     _directory = getHdfsDirectory(dir);
 
-    long period = refreshUnit.toMillis(refreshAmount);
-    indexImporterTimer.schedule(this, period, period);
+    long period = timeUnit.toMillis(refreshAmount);
+    long delay = timeUnit.toMillis(initalWaitTime);
+    indexImporterTimer.schedule(this, delay, period);
     _inindexImporterTimer = indexImporterTimer;
     _table = _shardContext.getTableContext().getTable();
     _shard = _shardContext.getShard();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/main/java/org/apache/blur/server/TableContext.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/server/TableContext.java b/blur-core/src/main/java/org/apache/blur/server/TableContext.java
index 46a649b..375de78 100644
--- a/blur-core/src/main/java/org/apache/blur/server/TableContext.java
+++ b/blur-core/src/main/java/org/apache/blur/server/TableContext.java
@@ -370,7 +370,7 @@ public class TableContext implements Cloneable {
   @SuppressWarnings("unchecked")
   public BlurIndex newInstanceBlurIndex(ShardContext shardContext, Directory dir, SharedMergeScheduler
mergeScheduler,
       ExecutorService searchExecutor, BlurIndexCloser indexCloser, Timer indexImporterTimer,
Timer bulkTimer,
-      ThriftCache thriftCache) throws IOException {
+      ThriftCache thriftCache, Timer indexWriterTimer, long maxWriterIdle) throws IOException
{
 
     String className = _blurConfiguration.get(BLUR_SHARD_BLURINDEX_CLASS, BlurIndexSimpleWriter.class.getName());
 
@@ -383,7 +383,7 @@ public class TableContext implements Cloneable {
     Constructor<? extends BlurIndex> constructor = findConstructor(clazz);
     try {
       return constructor.newInstance(shardContext, dir, mergeScheduler, searchExecutor, indexCloser,
-          indexImporterTimer, bulkTimer, thriftCache);
+          indexImporterTimer, bulkTimer, thriftCache, indexWriterTimer, maxWriterIdle);
     } catch (InstantiationException e) {
       throw new IOException(e);
     } catch (IllegalAccessException e) {
@@ -398,7 +398,8 @@ public class TableContext implements Cloneable {
   private Constructor<? extends BlurIndex> findConstructor(Class<? extends BlurIndex>
clazz) throws IOException {
     try {
       return clazz.getConstructor(new Class[] { ShardContext.class, Directory.class, SharedMergeScheduler.class,
-          ExecutorService.class, BlurIndexCloser.class, Timer.class, Timer.class, ThriftCache.class
});
+          ExecutorService.class, BlurIndexCloser.class, Timer.class, Timer.class, ThriftCache.class,
Timer.class,
+          Long.TYPE });
     } catch (NoSuchMethodException e) {
       throw new IOException(e);
     } catch (SecurityException e) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
index 00e2b22..b7f969c 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
@@ -40,6 +40,7 @@ import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_DEEP_PAGING_CACHE_S
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_FETCHCOUNT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_FILTER_CACHE_CLASS;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_HOSTNAME;
+import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_INDEX_MAX_IDLE_TIME;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_INTERNAL_SEARCH_THREAD_COUNT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_MERGE_THREAD_COUNT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_OPENER_THREAD_COUNT;
@@ -218,12 +219,15 @@ public class ThriftBlurShardServer extends ThriftServer {
     final Timer hdfsKeyValueTimer = new Timer("HDFS KV Store", true);
     final Timer indexImporterTimer = new Timer("IndexImporter", true);
     final Timer indexBulkTimer = new Timer("BulkIndex", true);
+    final Timer indexIdleWriterTimer = new Timer("BlurIdleWriter", true);
     long smallMergeThreshold = configuration.getLong(BLUR_SHARD_SMALL_MERGE_THRESHOLD, 128
* 1000 * 1000);
+    long maxWriterIdle = configuration.getLong(BLUR_SHARD_INDEX_MAX_IDLE_TIME, 30000);
     SequentialReadControl sequentialReadControl = new SequentialReadControl(configuration);
     final DistributedIndexServer indexServer = new DistributedIndexServer(config, zooKeeper,
clusterStatus,
         filterCache, blockCacheDirectoryFactory, distributedLayoutFactory, cluster, nodeName,
safeModeDelay,
         shardOpenerThreadCount, maxMergeThreads, internalSearchThreads, minimumNumberOfNodesBeforeExitingSafeMode,
-        hdfsKeyValueTimer, indexImporterTimer, smallMergeThreshold, indexBulkTimer, thriftCache,
sequentialReadControl);
+        hdfsKeyValueTimer, indexImporterTimer, smallMergeThreshold, indexBulkTimer, thriftCache,
sequentialReadControl,
+        indexIdleWriterTimer, maxWriterIdle);
 
     BooleanQuery.setMaxClauseCount(configuration.getInt(BLUR_MAX_CLAUSE_COUNT, 1024));
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/test/java/org/apache/blur/command/ShardCommandManagerTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/command/ShardCommandManagerTest.java
b/blur-core/src/test/java/org/apache/blur/command/ShardCommandManagerTest.java
index eded6c4..862c509 100644
--- a/blur-core/src/test/java/org/apache/blur/command/ShardCommandManagerTest.java
+++ b/blur-core/src/test/java/org/apache/blur/command/ShardCommandManagerTest.java
@@ -375,7 +375,7 @@ public class ShardCommandManagerTest {
 
   protected BlurIndex getNullBlurIndex(String shard) throws IOException {
     ShardContext shardContext = ShardContext.create(getTableContextFactory().getTableContext("test"),
shard);
-    return new BlurIndex(shardContext, null, null, null, null, null, null, null) {
+    return new BlurIndex(shardContext, null, null, null, null, null, null, null, null, 0)
{
 
       @Override
       public void removeSnapshot(String name) throws IOException {
@@ -410,16 +410,16 @@ public class ShardCommandManagerTest {
       @Override
       public IndexSearcherCloseable getIndexSearcher() throws IOException {
         IndexReader reader = getEmtpyReader();
-        return new IndexSearcherCloseableBase(reader,null) {
-          
+        return new IndexSearcherCloseableBase(reader, null) {
+
           @Override
           public Directory getDirectory() {
             throw new RuntimeException("Not implemented.");
           }
-          
+
           @Override
           public void close() throws IOException {
-            
+
           }
         };
       }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/test/java/org/apache/blur/command/stream/StreamServerTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/command/stream/StreamServerTest.java
b/blur-core/src/test/java/org/apache/blur/command/stream/StreamServerTest.java
index d28f6c9..0e27d4c 100644
--- a/blur-core/src/test/java/org/apache/blur/command/stream/StreamServerTest.java
+++ b/blur-core/src/test/java/org/apache/blur/command/stream/StreamServerTest.java
@@ -211,7 +211,7 @@ public class StreamServerTest implements Serializable {
     tableDescriptor.setTableUri("file:///tmp");
     TableContext tableContext = TableContext.create(tableDescriptor);
     ShardContext shardContext = ShardContext.create(tableContext, shard);
-    return new BlurIndex(shardContext, null, null, null, null, null, null, null) {
+    return new BlurIndex(shardContext, null, null, null, null, null, null, null, null, 0)
{
 
       @Override
       public void removeSnapshot(String name) throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java b/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
index 2f275c7..e5bd42d 100644
--- a/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
+++ b/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
@@ -112,7 +112,7 @@ public class IndexManagerTest {
     base = new File(TMPDIR, "blur-index-manager-test");
     rm(base);
 
-    File file = new File(base, TABLE);
+    File file = new File(new File(base, TABLE), UUID.randomUUID().toString());
     file.mkdirs();
 
     IndexManagerTestReadInterceptor.interceptor = null;
@@ -124,7 +124,7 @@ public class IndexManagerTest {
     tableDescriptor.setShardCount(1);
     tableDescriptor.putToTableProperties(BlurConstants.BLUR_SHARD_READ_INTERCEPTOR,
         IndexManagerTestReadInterceptor.class.getName());
-    server = new LocalIndexServer(tableDescriptor, true);
+    server = new LocalIndexServer(tableDescriptor);
 
     BlurFilterCache filterCache = new DefaultBlurFilterCache(new BlurConfiguration());
     long statusCleanupTimerDelay = 1000;
@@ -230,8 +230,10 @@ public class IndexManagerTest {
 
   @After
   public void teardown() {
-    indexManager.close();
-    indexManager = null;
+    if (indexManager != null) {
+      indexManager.close();
+      indexManager = null;
+    }
     server = null;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexSimpleWriterTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexSimpleWriterTest.java
b/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexSimpleWriterTest.java
index f807053..e4f31ac 100644
--- a/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexSimpleWriterTest.java
+++ b/blur-core/src/test/java/org/apache/blur/manager/writer/BlurIndexSimpleWriterTest.java
@@ -30,6 +30,7 @@ import java.util.Random;
 import java.util.Timer;
 import java.util.UUID;
 import java.util.concurrent.ExecutorService;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.blur.BlurConfiguration;
 import org.apache.blur.concurrent.Executors;
@@ -78,13 +79,15 @@ public class BlurIndexSimpleWriterTest {
   private SharedMergeScheduler _mergeScheduler;
   private String uuid;
   private BlurIndexCloser _closer;
-  private Timer _timer;
+  private Timer _indexImporterTimer;
   private Timer _bulkTimer;
+  private Timer _idleWriterTimer;
 
   @Before
   public void setup() throws IOException {
-    _timer = new Timer("Index Importer", true);
+    _indexImporterTimer = new Timer("Index Importer", true);
     _bulkTimer = new Timer("Bulk Indexing", true);
+    _idleWriterTimer = new Timer("Idle Writer", true);
     TableContext.clear();
     _base = new File(TMPDIR, "blur-index-writer-test");
     rmr(_base);
@@ -124,17 +127,20 @@ public class BlurIndexSimpleWriterTest {
     BlurLockFactory lockFactory = new BlurLockFactory(_configuration, hdfsPath, "unit-test",
BlurUtil.getPid());
     directory.setLockFactory(lockFactory);
 
-    // FSDirectory directory = FSDirectory.open(path);
-
     ShardContext shardContext = ShardContext.create(tableContext, "test-shard-" + uuid);
-    _writer = new BlurIndexSimpleWriter(shardContext, directory, _mergeScheduler, _service,
_closer, _timer,
-        _bulkTimer, null);
+    _writer = new BlurIndexSimpleWriter(shardContext, directory, _mergeScheduler, _service,
_closer,
+        _indexImporterTimer, _bulkTimer, null, _idleWriterTimer, TimeUnit.SECONDS.toMillis(5));
   }
 
   @After
   public void tearDown() throws IOException {
-    _timer.cancel();
-    _timer.purge();
+    _indexImporterTimer.cancel();
+    _indexImporterTimer.purge();
+    _bulkTimer.cancel();
+    _bulkTimer.purge();
+    _idleWriterTimer.cancel();
+    _idleWriterTimer.purge();
+
     _writer.close();
     _mergeScheduler.close();
     _service.shutdownNow();
@@ -220,6 +226,9 @@ public class BlurIndexSimpleWriterTest {
       assertEquals(i + 1, reader.numDocs());
       searcher.close();
       total++;
+      int readersToBeClosedCount = _closer.getReadersToBeClosedCount();
+      int readerGenerationCount = _writer.getReaderGenerationCount();
+      assertEquals(1, (readerGenerationCount - readersToBeClosedCount));
     }
     Trace.tearDownTrace();
     long e = System.nanoTime();
@@ -321,6 +330,19 @@ public class BlurIndexSimpleWriterTest {
     runQueueTest(TOTAL_ROWS_FOR_TESTS, TOTAL_ROWS_FOR_TESTS * 3);
   }
 
+  @Test
+  public void testAutoCloseOfWriter() throws InterruptedException, IOException {
+    setupWriter(_configuration);
+    Thread.sleep(TimeUnit.SECONDS.toMillis(5));
+    for (int i = 0; i < 10; i++) {
+      if (_writer.isWriterClosed()) {
+        return;
+      }
+      Thread.sleep(TimeUnit.SECONDS.toMillis(1));
+    }
+    fail();
+  }
+
   private void runQueueTest(final int mutatesToAdd, int numberOfValidDocs) throws IOException,
InterruptedException {
     final String table = _writer.getShardContext().getTableContext().getTable();
     Thread thread = new Thread(new Runnable() {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/test/java/org/apache/blur/manager/writer/IndexImporterTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/manager/writer/IndexImporterTest.java
b/blur-core/src/test/java/org/apache/blur/manager/writer/IndexImporterTest.java
index cfac626..47a308c 100644
--- a/blur-core/src/test/java/org/apache/blur/manager/writer/IndexImporterTest.java
+++ b/blur-core/src/test/java/org/apache/blur/manager/writer/IndexImporterTest.java
@@ -122,11 +122,11 @@ public class IndexImporterTest {
     BufferStore.initNewBuffer(128, 128 * 128);
 
     _indexImporter = new IndexImporter(_timer, getBlurIndex(shardContext, _mainDirectory),
shardContext,
-        TimeUnit.MINUTES, 10, null, _mainDirectory);
+        TimeUnit.MINUTES, 10, 10, null, _mainDirectory);
   }
 
   private BlurIndex getBlurIndex(ShardContext shardContext, final Directory mainDirectory)
throws IOException {
-    return new BlurIndex(shardContext, mainDirectory, null, null, null, null, null, null)
{
+    return new BlurIndex(shardContext, mainDirectory, null, null, null, null, null, null,
null, 0) {
 
       @Override
       public void removeSnapshot(String name) throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-core/src/test/java/org/apache/blur/thrift/BlurMutationBug.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurMutationBug.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurMutationBug.java
index 95c1d49..7eb2e14 100644
--- a/blur-core/src/test/java/org/apache/blur/thrift/BlurMutationBug.java
+++ b/blur-core/src/test/java/org/apache/blur/thrift/BlurMutationBug.java
@@ -39,6 +39,12 @@ public class BlurMutationBug {
   private final String tableName;
   private final String[] rowIds;
 
+  public static void main(String[] args) throws TException {
+    Iface client = BlurClient.getClient("localhost:40010");
+    BlurMutationBug blurMutationBug = new BlurMutationBug(client, "testtable", 20);
+    blurMutationBug.runTest(5, TimeUnit.MINUTES);
+  }
+
   public BlurMutationBug(Iface client, String tableName, int totalIds) {
     this.client = client;
     this.tableName = tableName;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-store/src/main/java/org/apache/blur/index/IndexDeletionPolicyReader.java
----------------------------------------------------------------------
diff --git a/blur-store/src/main/java/org/apache/blur/index/IndexDeletionPolicyReader.java
b/blur-store/src/main/java/org/apache/blur/index/IndexDeletionPolicyReader.java
index 2bca357..a1552b7 100644
--- a/blur-store/src/main/java/org/apache/blur/index/IndexDeletionPolicyReader.java
+++ b/blur-store/src/main/java/org/apache/blur/index/IndexDeletionPolicyReader.java
@@ -84,4 +84,8 @@ public class IndexDeletionPolicyReader extends IndexDeletionPolicy {
     _gens.remove(gen);
   }
 
+  public int getReaderGenerationCount() {
+    return _gens.size();
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
----------------------------------------------------------------------
diff --git a/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java b/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
index 5f89b40..472481b 100644
--- a/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
+++ b/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
@@ -79,6 +79,7 @@ public class BlurConstants {
   public static final String BLUR_SHARD_INTERNAL_SEARCH_THREAD_COUNT = "blur.shard.internal.search.thread.count";
   public static final String BLUR_SHARD_INDEX_WRITER_SORT_MEMORY = "blur.shard.index.writer.sort.memory";
   public static final String BLUR_SHARD_INDEX_WRITER_SORT_FACTOR = "blur.shard.index.writer.sort.factor";
+  public static final String BLUR_SHARD_INDEX_MAX_IDLE_TIME = "blur.shard.index.max.idle.time";
   public static final String BLUR_TABLE_DISABLE_FAST_DIR = "blur.table.disable.fast.dir";
   public static final String BLUR_BULK_UPDATE_WORKING_PATH = "blur.bulk.update.working.path";
   public static final String BLUR_BULK_UPDATE_WORKING_PATH_PERMISSION = "blur.bulk.update.working.path.permission";

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/805e3c53/blur-util/src/main/resources/blur-default.properties
----------------------------------------------------------------------
diff --git a/blur-util/src/main/resources/blur-default.properties b/blur-util/src/main/resources/blur-default.properties
index d22c603..7a95437 100644
--- a/blur-util/src/main/resources/blur-default.properties
+++ b/blur-util/src/main/resources/blur-default.properties
@@ -248,6 +248,9 @@ blur.indexmanager.mutate.thread.count=8
 # The number of thread used for parallel faceting in the index manager
 blur.indexmanager.facet.thread.count=8
 
+# The max time that a writer will stay open after it has become idle, default 30 seconds.
+blur.shard.index.max.idle.time=30000
+
 # The number of reads during normal read operations of a index input in sequence that will
trigger a sequential read switch.
 blur.shard.default.read.sequential.threshold=25
 


Mime
View raw message