HBASE-4673 NPE in HFileReaderV2.close during major compaction when hfile.block.cache.size is set to 0

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1189481 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
larsh 2011-10-26 21:32:43 +00:00
parent 055d8e3b8c
commit 9f2204fbe3
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,9 @@ Release 0.93.0 - Unreleased
BUG FIXES
HBASE-4488 Store could miss rows during flush (Lars H via jgray)
HBASE-4673 NPE in HFileReaderV2.close during major compaction when
hfile.block.cache.size is set to 0 (Lars H)
TESTS
HBASE-4534 A new unit test for lazy seek and StoreScanner in general
(mikhail via jgray)

View File

@ -323,7 +323,7 @@ public class HFileReaderV2 extends AbstractHFileReader {
}
public void close(boolean evictOnClose) throws IOException {
if (evictOnClose) {
if (evictOnClose && cacheConf.isBlockCacheEnabled()) {
int numEvicted = cacheConf.getBlockCache().evictBlocksByPrefix(name
+ HFile.CACHE_KEY_SEPARATOR);
LOG.debug("On close of file " + name + " evicted " + numEvicted