protected Options getOptions() {
    Options options = getCommonOptions();

    options.addOption(Option.builder("rsgroup").required().desc("Tables of rsgroup to be compacted")
      .hasArg().build());

    return options;
  }
This script takes an rsgroup as argument and compacts part/all of regions of that table based on
the table's TTL.
hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupMajorCompactionTTL.java