@Override
    public InternalScanner preCompact(ObserverContext<? extends RegionCoprocessorEnvironment> e,
      Store store, InternalScanner scanner, ScanType scanType, CompactionLifeCycleTracker tracker,
      CompactionRequest request) throws IOException {
      try {
        Thread.sleep(sleepDuration);
      } catch (InterruptedException ie) {
        IOException ioe = new InterruptedIOException();
        ioe.initCause(ie);
        throw ioe;
      }
      return scanner;
    }
Thread that does full scans of the table looking for any partially completed rows. Each
iteration of this loads 10 hdfs files, which occupies 5 file open file handles. So every 10
iterations (500 file handles) it does a region compaction to reduce the number of open file
handles.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionServerBulkLoad.java