@Override
    public void setup(Context context) {
      Configuration conf = context.getConfiguration();
      compactOnce = conf.getBoolean(CONF_COMPACT_ONCE, false);
      major = conf.getBoolean(CONF_COMPACT_MAJOR, false);

      try {
        FileSystem fs = CommonFSUtils.getRootDirFileSystem(conf);
        this.compactor = new CompactionWorker(fs, conf);
      } catch (IOException e) {
        throw new RuntimeException("Could not get the input FileSystem", e);
      }
      // Disable the MemStoreLAB as MemStore is not used by flow during compaction
      conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
    }
Execute the actual compaction job. If the compact once flag is not specified, execute the
compaction until no more compactions are needed. Uses the Configuration settings provided.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java