incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Fixing issue with log file cleanup in the hdfs KV store.
Date Wed, 29 Oct 2014 02:51:55 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master ce2179ed5 -> da0dde4a1


Fixing issue with log file cleanup in the hdfs KV store.


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

Branch: refs/heads/master
Commit: da0dde4a1326a8ffc8d0855f078ec3a2bc0a37ac
Parents: ce2179e
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Oct 28 22:51:41 2014 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Oct 28 22:51:41 2014 -0400

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


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/da0dde4a/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 b48ea7a..1904dd3 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
@@ -223,6 +223,11 @@ public class HdfsKeyValueStore implements Store {
         _writeLock.lock();
         try {
           if (_output != null && _lastWrite.get() + MAX_OPEN_FOR_WRITING < System.currentTimeMillis())
{
+            try {
+              cleanupOldFiles();
+            } catch (IOException e) {
+              LOG.error("Unknown error while trying to clean up old files.", e);
+            }
             // Close writer
             LOG.info("Closing KV log due to inactivity [{0}].", _path);
             try {
@@ -232,11 +237,6 @@ public class HdfsKeyValueStore implements Store {
             } finally {
               _output = null;
             }
-            try {
-              cleanupOldFiles();
-            } catch (IOException e) {
-              LOG.error("Unknown error while trying to clean up old files.", e);
-            }
           }
         } finally {
           _writeLock.unlock();


Mime
View raw message