incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] incubator-blur git commit: Fixing Hdfs kv store test.
Date Wed, 12 Nov 2014 01:01:40 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master 3cbfe1304 -> da5600c5d


Fixing Hdfs kv store test.


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

Branch: refs/heads/master
Commit: cf21011a82590b591b58139b3f18b535384a54b1
Parents: 2db2bf3
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Nov 11 20:01:18 2014 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Nov 11 20:01:18 2014 -0500

----------------------------------------------------------------------
 .../org/apache/blur/store/hdfs_v2/HdfsKeyValueStore.java    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/cf21011a/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/HdfsKeyValueStore.java
----------------------------------------------------------------------
diff --git a/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/HdfsKeyValueStore.java
b/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/HdfsKeyValueStore.java
index fe917f2..81616eb 100644
--- a/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/HdfsKeyValueStore.java
+++ b/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/HdfsKeyValueStore.java
@@ -359,6 +359,7 @@ public class HdfsKeyValueStore implements Store {
   private void rollFile() throws IOException {
     LOG.info("Rolling file [" + _outputPath + "]");
     _output.close();
+    _output = null;
     openWriter();
   }
 
@@ -449,15 +450,15 @@ public class HdfsKeyValueStore implements Store {
   @Override
   public void close() throws IOException {
     if (!_isClosed) {
+      _isClosed = true;
       _timerTask.cancel();
       _writeLock.lock();
       try {
-        syncInternal();
-        if (_output != null) {
+        if (isOpenForWriting()) {
+          syncInternal();
           _output.close();
+          _output = null;
         }
-        _fileSystem.close();
-        _isClosed = true;
       } finally {
         _writeLock.unlock();
       }


Mime
View raw message