@Override
  protected final void abortWriter(StoreFileWriter writer) throws IOException {
    List<Path> leftoverFiles = writer.getPaths();
    try {
      writer.close();
    } catch (IOException e) {
      LOG.warn("Failed to close the writer after an unfinished compaction.", e);
    }
    try {
      for (Path path : leftoverFiles) {
        store.getFileSystem().delete(path, false);
      }
    } catch (IOException e) {
      LOG.warn("Failed to delete the leftover file {} after an unfinished compaction.",
        leftoverFiles, e);
    }
  }
Do a minor/major compaction on an explicit set of storefiles from a Store.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DefaultCompactor.java