hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject svn commit: r1307034 - /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Thu, 29 Mar 2012 18:31:03 GMT
Author: ramkrishna
Date: Thu Mar 29 18:31:03 2012
New Revision: 1307034

URL: http://svn.apache.org/viewvc?rev=1307034&view=rev
Log:
HBASE-5097 RegionObserver implementation whose preScannerOpen and postScannerOpen Impl return
null can stall the system initialization through NPE (Ram)

Modified:
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1307034&r1=1307033&r2=1307034&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Thu Mar 29 18:31:03 2012
@@ -2068,7 +2068,16 @@ public class HRegionServer implements HR
         s = r.getScanner(scan);
       }
       if (r.getCoprocessorHost() != null) {
-        s = r.getCoprocessorHost().postScannerOpen(scan, s);
+        if (r.getCoprocessorHost() != null) {
+          RegionScanner savedScanner = r.getCoprocessorHost().postScannerOpen(
+              scan, s);
+          if (savedScanner == null) {
+            LOG.warn("PostScannerOpen impl returning null. "
+                + "Check the RegionObserver implementation.");
+          } else {
+            s = savedScanner;
+          }
+        }
       }
       return addScanner(s);
     } catch (Throwable t) {



Mime
View raw message