@Override
  public InternalScanner preCompact(ObserverContext<? extends RegionCoprocessorEnvironment> c,
    Store store, InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker,
    CompactionRequest request) throws IOException {
    ctPreCompact.incrementAndGet();
    return scanner;
  }
A sample region observer that tests the RegionObserver interface. It works with
TestRegionObserverInterface to provide the test case.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java