incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/3] git commit: Fixing a bug where old filenames have not been synced however the meta data is missing due to a log file role in the keyvalue store.
Date Thu, 06 Feb 2014 18:58:53 GMT
Updated Branches:
  refs/heads/apache-blur-0.2 64da3a8f3 -> 1a445d006


Fixing a bug where old filenames have not been synced however the meta data is missing due
to a log file role in the keyvalue 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/41e44e80
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/41e44e80
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/41e44e80

Branch: refs/heads/apache-blur-0.2
Commit: 41e44e80feca200aa514f80cfe2ef0b882943745
Parents: 64da3a8
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Feb 4 16:27:18 2014 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Feb 4 16:27:18 2014 -0500

----------------------------------------------------------------------
 .../apache/blur/store/hdfs_v2/FastHdfsKeyValueDirectory.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/41e44e80/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/FastHdfsKeyValueDirectory.java
----------------------------------------------------------------------
diff --git a/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/FastHdfsKeyValueDirectory.java
b/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/FastHdfsKeyValueDirectory.java
index acde4f0..ee1f15c 100644
--- a/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/FastHdfsKeyValueDirectory.java
+++ b/blur-store/src/main/java/org/apache/blur/store/hdfs_v2/FastHdfsKeyValueDirectory.java
@@ -24,6 +24,8 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.blur.log.Log;
+import org.apache.blur.log.LogFactory;
 import org.apache.blur.store.blockcache.LastModified;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
@@ -36,6 +38,8 @@ import org.apache.lucene.util.BytesRef;
 
 public class FastHdfsKeyValueDirectory extends Directory implements LastModified {
 
+  private static final Log LOG = LogFactory.getLog(FastHdfsKeyValueDirectory.class);
+
   private static final String LASTMOD = "/lastmod";
   private static final String LENGTH = "/length";
   private static final BytesRef FILES = new BytesRef("FILES");
@@ -76,7 +80,8 @@ public class FastHdfsKeyValueDirectory extends Directory implements LastModified
         if (_store.get(key, value)) {
           _files.put(file, Long.parseLong(value.utf8ToString()));
         } else {
-          throw new IOException("Missing meta data for [" + key.utf8ToString() + "].");
+          _files.put(file, 0L);
+          LOG.warn("Missing meta data for file [{0}], setting length to '0'.", file);
         }
       }
     }


Mime
View raw message