hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject svn commit: r1307035 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Thu, 29 Mar 2012 18:32:53 GMT
Author: ramkrishna
Date: Thu Mar 29 18:32:52 2012
New Revision: 1307035

URL: http://svn.apache.org/viewvc?rev=1307035&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.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1307035&r1=1307034&r2=1307035&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Thu Mar 29 18:32:52 2012
@@ -2324,7 +2324,14 @@ public class HRegionServer implements HR
         s = r.getScanner(scan);
       }
       if (r.getCoprocessorHost() != null) {
-        s = r.getCoprocessorHost().postScannerOpen(scan, s);
+        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