diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 90cf3a3c92f..9c215b456bb 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -2326,7 +2326,14 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler, 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) {