public InternalScanner preFlush(HStore store, InternalScanner scanner,
    FlushLifeCycleTracker tracker) throws IOException {
    if (coprocEnvironments.isEmpty()) {
      return scanner;
    }
    return execOperationWithResult(new ObserverOperationWithResult<RegionObserver, InternalScanner>(
      regionObserverGetter, scanner) {
      @Override
      public InternalScanner call(RegionObserver observer) throws IOException {
        InternalScanner scanner = observer.preFlush(this, store, getResult(), tracker);
        if (scanner == null) {
          throw new CoprocessorException("Null Scanner return disallowed!");
        }
        return scanner;
      }
    });
  }
Invoked before a memstore flush
@return Scanner to use (cannot be null!)
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java