hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ryan rawson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-3224) NPE in KeyValue$KVComparator.compare when compacting
Date Thu, 11 Nov 2010 08:06:14 GMT

    [ https://issues.apache.org/jira/browse/HBASE-3224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930955#action_12930955
] 

ryan rawson commented on HBASE-3224:
------------------------------------

this is a bug in half hfile reader with reseekTo() which is causing scanners to have 'nulls'
in the scanner stack thus kicking out this exception later on.

The nominal fix is, I think like so:
diff --git a/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java b/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
index d35a28a..711e0d1 100644
--- a/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
+++ b/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
@@ -229,6 +229,9 @@ public class HalfStoreFileReader extends StoreFile.Reader {
             return 1;
           }
         }
+        if (!top && atEnd) {
+          return 1;
+        }
         return delegate.reseekTo(key, offset, length);
       }
 

I need to write a unit test, but that will have to wait for tomorrow.

> NPE in KeyValue$KVComparator.compare when compacting
> ----------------------------------------------------
>
>                 Key: HBASE-3224
>                 URL: https://issues.apache.org/jira/browse/HBASE-3224
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Jean-Daniel Cryans
>            Assignee: ryan rawson
>            Priority: Critical
>             Fix For: 0.90.0
>
>
> While testing normal insertion via PE, I got this recurrent NPE coming out of KeyValue$KVComparator.compare
while it's compacting. So far I saw 2 different stack traces:
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.hadoop.hbase.KeyValue$KVComparator.compare(KeyValue.java:1356)
> 	at org.apache.hadoop.hbase.regionserver.KeyValueHeap.reseek(KeyValueHeap.java:250)
> 	at org.apache.hadoop.hbase.regionserver.StoreScanner.reseek(StoreScanner.java:385)
> 	at org.apache.hadoop.hbase.regionserver.StoreScanner.next(StoreScanner.java:291)
> 	at org.apache.hadoop.hbase.regionserver.StoreScanner.next(StoreScanner.java:324)
> 	at org.apache.hadoop.hbase.regionserver.Store.compact(Store.java:926)
> 	at org.apache.hadoop.hbase.regionserver.Store.compact(Store.java:734)
> {noformat}
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.hadoop.hbase.KeyValue$KVComparator.compare(KeyValue.java:1375)
> 	at org.apache.hadoop.hbase.regionserver.KeyValueHeap$KVScannerComparator.compare(KeyValueHeap.java:180)
> 	at org.apache.hadoop.hbase.regionserver.KeyValueHeap$KVScannerComparator.compare(KeyValueHeap.java:156)
> 	at org.apache.hadoop.hbase.regionserver.KeyValueHeap$KVScannerComparator.compare(KeyValueHeap.java:146)
> 	at java.util.PriorityQueue.siftUpUsingComparator(PriorityQueue.java:594)
> 	at java.util.PriorityQueue.siftUp(PriorityQueue.java:572)
> 	at java.util.PriorityQueue.offer(PriorityQueue.java:274)
> 	at java.util.PriorityQueue.add(PriorityQueue.java:251)
> 	at org.apache.hadoop.hbase.regionserver.KeyValueHeap.reseek(KeyValueHeap.java:258)
> 	at org.apache.hadoop.hbase.regionserver.StoreScanner.reseek(StoreScanner.java:385)
> 	at org.apache.hadoop.hbase.regionserver.StoreScanner.next(StoreScanner.java:291)
> 	at org.apache.hadoop.hbase.regionserver.StoreScanner.next(StoreScanner.java:324)
> 	at org.apache.hadoop.hbase.regionserver.Store.compact(Store.java:926)
> 	at org.apache.hadoop.hbase.regionserver.Store.compact(Store.java:734)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message