@Override
  protected CompactionRequestImpl createCompactionRequest(ArrayList<HStoreFile> candidateSelection,
    boolean tryingMajor, boolean mayUseOffPeak, boolean mayBeStuck) throws IOException {
    if (!tryingMajor) {
      filterBulk(candidateSelection);
      candidateSelection = applyCompactionPolicy(candidateSelection, mayUseOffPeak, mayBeStuck);
      candidateSelection =
        checkMinFilesCriteria(candidateSelection, comConf.getMinFilesToCompact());
    }
    return new CompactionRequestImpl(candidateSelection);
  }
The default algorithm for selecting files for compaction. Combines the compaction configuration
and the provisional file selection that it's given to produce the list of suitable candidates for
compaction.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java