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

ryan rawson commented on HBASE-3524:
------------------------------------

try this patch:

diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java 
b/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
index d7e3ce3..519111a 100644
--- a/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
+++ b/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
@@ -829,7 +829,10 @@ public class Store implements HeapSize {
       if (filesToCompact.size() == 1) {
         // Single file
         StoreFile sf = filesToCompact.get(0);
-        long oldest = now - sf.getReader().timeRangeTracker.minimumTimestamp;
+        long oldest =
+            (sf.getReader().timeRangeTracker == null) ?
+                Long.MIN_VALUE :
+                now - sf.getReader().timeRangeTracker.minimumTimestamp;
         if (sf.isMajorCompaction() &&
             (this.ttl == HConstants.FOREVER || oldest < this.ttl)) {
           if (LOG.isDebugEnabled()) {

no test yet! doh!

> NPE from CompactionChecker
> --------------------------
>
>                 Key: HBASE-3524
>                 URL: https://issues.apache.org/jira/browse/HBASE-3524
>             Project: HBase
>          Issue Type: Bug
>            Reporter: James Kennedy
>             Fix For: 0.90.2
>
>
> I recently updated production data to use HBase 0.90.0.
> Now I'm periodically seeing:
> [10/02/11 17:23:27] 30076066 [mpactionChecker] ERROR 
> nServer$MajorCompactionChecker  - Caught exception
> java.lang.NullPointerException
>       at 
> org.apache.hadoop.hbase.regionserver.Store.isMajorCompaction(Store.java:832)
>       at 
> org.apache.hadoop.hbase.regionserver.Store.isMajorCompaction(Store.java:810)
>       at 
> org.apache.hadoop.hbase.regionserver.HRegion.isMajorCompaction(HRegion.java:2800)
>       at 
> org.apache.hadoop.hbase.regionserver.HRegionServer$MajorCompactionChecker.chore(HRegionServer.java:1047)
>       at org.apache.hadoop.hbase.Chore.run(Chore.java:66)
> The only negative effect is that this is interrupting compactions from 
> happening. But that is pretty serious and this might be a sign of data 
> corruption?
> Maybe it's just my data, but this task should at least involve improving the 
> handling to catch the NPE and still iterate through the other onlineRegions 
> that might compact without error.  The MajorCompactionChecker.chore() method 
> only catches IOExceptions and so this NPE breaks out of that loop. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to