Repository: incubator-blur Updated Branches: refs/heads/master aeb3623da -> b97e31f93
Changing exception to warning message. Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/44ff932f Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/44ff932f Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/44ff932f Branch: refs/heads/master Commit: 44ff932ff0bd1a7ab136546af5f08e1a253abcaa Parents: aeb3623 Author: Aaron McCurry <[email protected]> Authored: Wed Mar 4 08:49:39 2015 -0500 Committer: Aaron McCurry <[email protected]> Committed: Wed Mar 4 08:49:39 2015 -0500 ---------------------------------------------------------------------- .../org/apache/blur/store/hdfs_v2/FastHdfsKeyValueDirectory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/44ff932f/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 a690e18..93e6fbb 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 @@ -44,6 +44,8 @@ import org.apache.lucene.util.BytesRef; public class FastHdfsKeyValueDirectory extends Directory implements LastModified { + private static final String MISSING_METADATA_MESSAGE = "Missing meta data for file [{0}], setting length to '0'. This can occur when a kv log files writes across blocks in hdfs."; + private static final long GC_DELAY = TimeUnit.HOURS.toMillis(1); private static final Log LOG = LogFactory.getLog(FastHdfsKeyValueDirectory.class); @@ -75,7 +77,7 @@ 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 file [" + file + "], setting length to '0'."); + LOG.warn(MISSING_METADATA_MESSAGE, file); } } }
