incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] git commit: Changing the closing behavior of the blurindexsimplewriter to not block and wait for merges to complete. This fixes issue with disable table hanging.
Date Tue, 28 Apr 2015 00:50:23 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master 9623f67ac -> 8e36828b0


Changing the closing behavior of the blurindexsimplewriter to not block and wait for merges
to complete.  This fixes issue with disable table hanging.


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

Branch: refs/heads/master
Commit: beb6c89319fe6b9a840a1913ad589183c3b26b61
Parents: 9623f67
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Mon Apr 27 20:28:37 2015 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Mon Apr 27 20:28:37 2015 -0400

----------------------------------------------------------------------
 .../blur/manager/writer/BlurIndexSimpleWriter.java       | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb6c893/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 02a55ae..72a052a 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
@@ -418,7 +418,16 @@ public class BlurIndexSimpleWriter extends BlurIndex {
   public void close() throws IOException {
     _isClosed.set(true);
     IOUtils.cleanup(LOG, makeCloseable(_watchForIdleBulkWriters), _indexImporter, _mutationQueueProcessor,
-        _writer.get(), _indexReader.get(), _directory);
+        makeCloseable(_writer.get()), _indexReader.get(), _directory);
+  }
+
+  private Closeable makeCloseable(final BlurIndexWriter blurIndexWriter) {
+    return new Closeable() {
+      @Override
+      public void close() throws IOException {
+        blurIndexWriter.close(false);
+      }
+    };
   }
 
   private Closeable makeCloseable(final TimerTask timerTask) {


Mime
View raw message