@Override
    public InternalScanner preCompact(ObserverContext<? extends RegionCoprocessorEnvironment> c,
      Store store, InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker,
      CompactionRequest request) throws IOException {
      return NO_DATA;
    }
Don't allow any data to be written out in the compaction by creating a custom
{@link StoreScanner}.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverScannerOpenHook.java