@Override
    public InternalScanner preFlush(ObserverContext<? extends RegionCoprocessorEnvironment> c,
      Store store, InternalScanner scanner, FlushLifeCycleTracker tracker) throws IOException {
      return NO_DATA;
    }
Don't allow any data in a flush by creating a custom {@link StoreScanner}.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverScannerOpenHook.java