HBASE-5097 RegionObserver implementation whose preScannerOpen and postScannerOpen Impl return null can stall the system initialization through NPE (Ram)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1307036 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2e959382ef
commit
26de676dea
|
@ -2326,7 +2326,14 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
|
||||||
s = r.getScanner(scan);
|
s = r.getScanner(scan);
|
||||||
}
|
}
|
||||||
if (r.getCoprocessorHost() != null) {
|
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);
|
return addScanner(s);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
|
Loading…
Reference in New Issue