private static boolean parseCommandLine(
      CliContext ctx, Options options, String[] newArgs, HelpFormatter hf) {
    try {
      CommandLineParser parser = new DefaultParser();
      commandLine = parser.parse(options, newArgs);
      if (commandLine.hasOption(HELP_ARGS)) {
        hf.printHelp(SCRIPT_HINT, options, true);
        return false;
      }
      if (commandLine.hasOption(RPC_COMPRESS_ARGS)) {
        Config.rpcThriftCompressionEnable = true;
      }
      if (commandLine.hasOption(ISO8601_ARGS)) {
        timeFormat = RpcUtils.setTimeFormat("long");
      }
      if (commandLine.hasOption(TIMEOUT_ARGS)) {
        setQueryTimeout(commandLine.getOptionValue(TIMEOUT_ARGS));
      }
      if (commandLine.hasOption(Config.SQL_DIALECT)) {
        setSqlDialect(commandLine.getOptionValue(Config.SQL_DIALECT));
      }
    } catch (ParseException e) {
      ctx.getPrinter()
          .println(
              "Require more params input, eg. ./start-cli.sh(start-cli.bat if Windows) "
                  + "-h xxx.xxx.xxx.xxx -p xxxx -u xxx.");
      ctx.getPrinter().println("For more information, please check the following hint.");
      hf.printHelp(IOTDB, options, true);
      return false;
    } catch (NumberFormatException e) {
      ctx.getPrinter()
          .println(
              IOTDB_ERROR_PREFIX
                  + ": error format of max print row count, it should be an integer number");
      return false;
    }
    return true;
  }
IoTDB Client main function.

@param args launch arguments
@throws ClassNotFoundException ClassNotFoundException
iotdb-client/cli/src/main/java/org/apache/iotdb/cli/Cli.java