private int doClient(final FileSystem fs, final Set<Path> toCompactDirs,
    final boolean compactOnce, final boolean major) throws IOException {
    // Disable the MemStoreLAB as MemStore is not used by flow during compaction
    getConf().setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
    CompactionWorker worker = new CompactionWorker(fs, getConf());
    for (Path path : toCompactDirs) {
      worker.compact(path, compactOnce, major);
    }
    return 0;
  }
Execute compaction, from this client, one path at the time.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java