docs: public static void main(String[] args) throws Exception {
      ArgP argp = new ArgP();
      argp.addOption("--help", "Print help information.");
      CliOptions.addCommon(argp);
      FsckOptions.addDataOptions(argp);
      args = CliOptions.parse(argp, args);
  
      if (argp.has("--help")) {
        usage(argp, "", 0);
      }
  
      Config config = CliOptions.getConfig(argp);
      final FsckOptions options = new FsckOptions(argp, config);
      final TSDB tsdb = new TSDB(config);
      final ArrayList<Query> queries = new ArrayList<Query>();
      if (args != null && args.length > 0) {
        CliQuery.parseCommandLineQuery(args, tsdb, queries, null, null);
      }
      if (queries.isEmpty() && !argp.has("--full-scan")) {
        usage(argp, "Must supply a query or use the '--full-scan' flag", 1);
      }
      tsdb.checkNecessaryTablesExist().joinUninterruptibly();
  
      argp = null;
      final Fsck fsck = new Fsck(tsdb, options);
      try {
        if (!queries.isEmpty()) {
          fsck.runQueries(queries);
        } else {
          fsck.runFullTable();
        }
      } finally {
        tsdb.shutdown().joinUninterruptibly();
      }
      System.exit(fsck.totalErrors() == 0 ? 0 : 1);
    }