private StripeCompactionRequest selectL0OnlyCompaction(StripeInformationProvider si) {
    List<HStoreFile> l0Files = si.getLevel0Files();
    List<HStoreFile> selectedFiles = l0Files;
    if (shouldSelectL0Files(si)) {
      selectedFiles = selectSimpleCompaction(l0Files, false, false, true);
      assert !selectedFiles.isEmpty() : "Selected L0 files should not be empty";
    }
    StripeCompactionRequest request;
    if (si.getStripeCount() == 0) {
      Pair<Long, Integer> estimate = estimateTargetKvs(selectedFiles, config.getInitialCount());
      long targetKvs = estimate.getFirst();
      int targetCount = estimate.getSecond();
      request =
        new SplitStripeCompactionRequest(selectedFiles, OPEN_KEY, OPEN_KEY, targetCount, targetKvs);
      if (selectedFiles.size() == l0Files.size()) {
        ((SplitStripeCompactionRequest) request).setMajorRangeFull(); // L0 only, can drop deletes.
      }
      LOG.debug("Creating {} initial stripes with {} kvs each via L0 compaction of {}/{} files",
        targetCount, targetKvs, selectedFiles.size(), l0Files.size());
    } else {
      request = new BoundaryStripeCompactionRequest(selectedFiles, si.getStripeBoundaries());
      LOG.debug("Boundary L0 compaction of {}/{} files", selectedFiles.size(), l0Files.size());
    }
    return request;
  }
Selects the compaction of a single stripe using default policy.
@param sfs          Files.
@param allFilesOnly Whether a compaction of all-or-none files is needed.
@return The resulting selection.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/StripeCompactionPolicy.java