Repository: incubator-blur Updated Branches: refs/heads/master 724b2344a -> cfd95261d
Cache output should not observe the quiet parameter. Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/6b372028 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/6b372028 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/6b372028 Branch: refs/heads/master Commit: 6b3720285dad103555788ea848fae61a8b452b77 Parents: 724b234 Author: Aaron McCurry <[email protected]> Authored: Wed Mar 18 08:55:12 2015 -0400 Committer: Aaron McCurry <[email protected]> Committed: Wed Mar 18 08:55:12 2015 -0400 ---------------------------------------------------------------------- .../blur/store/blockcache_v2/CacheIndexOutput.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/6b372028/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheIndexOutput.java ---------------------------------------------------------------------- diff --git a/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheIndexOutput.java b/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheIndexOutput.java index 93e1e80..06f8f1b 100644 --- a/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheIndexOutput.java +++ b/blur-store/src/main/java/org/apache/blur/store/blockcache_v2/CacheIndexOutput.java @@ -35,7 +35,6 @@ public class CacheIndexOutput extends IndexOutput { private final int _fileBufferSize; private final int _cacheBlockSize; private final Store _store; - private final boolean _shouldBeQuiet; private long _position; private byte[] _buffer; @@ -52,7 +51,6 @@ public class CacheIndexOutput extends IndexOutput { _indexOutput = dir.createOutput(fileName, context); _store = BufferStore.instance(_cacheBlockSize); _buffer = _store.takeBuffer(_cacheBlockSize); - _shouldBeQuiet = _cache.shouldBeQuiet(directory, fileName); } @Override @@ -97,13 +95,11 @@ public class CacheIndexOutput extends IndexOutput { if (length == 0) { return; } - if (!_shouldBeQuiet) { - CacheValue cacheValue = _cache.newInstance(_directory, _fileName); - cacheValue.write(0, _buffer, 0, length); - long blockId = (_position - length) / _cacheBlockSize; - cacheValue = cacheValue.trim(length); - _cache.put(_directory, _fileName, new CacheKey(_fileId, blockId), cacheValue); - } + CacheValue cacheValue = _cache.newInstance(_directory, _fileName); + cacheValue.write(0, _buffer, 0, length); + long blockId = (_position - length) / _cacheBlockSize; + cacheValue = cacheValue.trim(length); + _cache.put(_directory, _fileName, new CacheKey(_fileId, blockId), cacheValue); _bufferPosition = 0; writeBufferToOutputStream(length); }
