docs: public static void main(String[] args) throws Exception {
      ArgP argp = new ArgP();
      CliOptions.addCommon(argp);
      argp.addOption("--use-data-table",
          "Scan against the raw data table instead of the meta data table.");
      args = CliOptions.parse(argp, args);
      if (args == null) {
        usage(argp, "Invalid usage");
        System.exit(2);
      } else if (args.length < 1) {
        usage(argp, "Not enough arguments");
        System.exit(2);
      }
      
      final boolean use_data_table = argp.has("--use-data-table");
      
      Config config = CliOptions.getConfig(argp);
      final TSDB tsdb = new TSDB(config);
      tsdb.checkNecessaryTablesExist().joinUninterruptibly();
      
      int rc;
      try {
        rc = runCommand(tsdb, use_data_table, args);
      } finally {
        try {
          tsdb.getClient().shutdown().joinUninterruptibly();
          LOG.info("Gracefully shutdown the TSD");
        } catch (Exception e) {
          LOG.error("Unexpected exception while shutting down", e);
          rc = 42;
        }
      }
      System.exit(rc);
    }