Changing legacy behavior so that if the old table block cache file types are left null that the legacy behavior will not override the blur configuration.
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/e965e329 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/e965e329 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/e965e329 Branch: refs/heads/master Commit: e965e329d48d7df9e585a195f085f4207e9c6e8f Parents: 10c8699 Author: Aaron McCurry <[email protected]> Authored: Tue Mar 17 22:11:57 2015 -0400 Committer: Aaron McCurry <[email protected]> Committed: Tue Mar 17 22:11:57 2015 -0400 ---------------------------------------------------------------------- .../java/org/apache/blur/store/blockcache_v2/CacheDirectory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e965e329/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheDirectory.java ---------------------------------------------------------------------- diff --git a/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheDirectory.java b/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheDirectory.java index e2b2303..7fed3ef 100644 --- a/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheDirectory.java +++ b/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheDirectory.java @@ -63,7 +63,7 @@ public class CacheDirectory extends Directory implements DirectoryDecorator, Las public IndexInput openInput(String name, IOContext context) throws IOException { IndexInput indexInput = _internal.openInput(name, context); - if (_cache.cacheFileForReading(this, name, context) || isCachableFile(name)) { + if (_cache.cacheFileForReading(this, name, context) || (_tableBlockCacheFileTypes != null && isCachableFile(name))) { return new CacheIndexInput(this, name, indexInput, _cache); } return indexInput; @@ -84,7 +84,7 @@ public class CacheDirectory extends Directory implements DirectoryDecorator, Las } public IndexOutput createOutput(String name, IOContext context) throws IOException { - if (_cache.cacheFileForWriting(this, name, context) || isCachableFile(name)) { + if (_cache.cacheFileForWriting(this, name, context) || (_tableBlockCacheFileTypes != null && isCachableFile(name))) { return new CacheIndexOutput(this, name, _cache, _internal, context); } return _internal.createOutput(name, context);
