class MC implements Command {

    @Override
    public void run() throws Exception {
        targets = Collections.newSetFromMap(new TreeMap<byte[], Boolean>(Bytes.BYTES_COMPARATOR));
        tableLevel = false; // or region level

        Set<String> tables = Args.tables(args, admin);
        assert tables != null;
        for (String table : tables) {
            if (args.has(Args.OPTION_REGION_SERVER) || args.has(Args.OPTION_LOCALITY_THRESHOLD)) {
                // MC at region level
                tableLevel = false;

                if (args.has(Args.OPTION_REGION_SERVER)) {
                    filterWithRsAndLocality(targets, table);
                } else {
                    if (args.has(Args.OPTION_LOCALITY_THRESHOLD)) {
                        filterWithLocalityOnly(targets, table);
                    }
                }
            } else {
                // MC at table level
                tableLevel = true;

                targets.add(table.getBytes());
            }
        }

        // todo check compaction queue before running

        if (tableLevel) {
            System.out.println(targets.size() + " tables will be compacted.");
        } else {
            System.out.println(targets.size() + " regions will be compacted.");
        }
        if (targets.size() == 0) return;
        if (!args.isForceProceed() && !Util.askProceed()) return;

        mc(tableLevel, targets);

        if (mcCounter.get() > 0)
            waitUntilFinish(tables);
    }

    public  MC(HBaseAdmin admin, Args args);

}