You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2011/10/26 23:32:44 UTC

svn commit: r1189481 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java

Author: larsh
Date: Wed Oct 26 21:32:43 2011
New Revision: 1189481

URL: http://svn.apache.org/viewvc?rev=1189481&view=rev
Log:
HBASE-4673  NPE in HFileReaderV2.close during major compaction when hfile.block.cache.size is set to 0

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1189481&r1=1189480&r2=1189481&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Wed Oct 26 21:32:43 2011
@@ -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)

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java?rev=1189481&r1=1189480&r2=1189481&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java Wed Oct 26 21:32:43 2011
@@ -323,7 +323,7 @@ public class HFileReaderV2 extends Abstr
   }
 
   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