code: public boolean init(String[] args) throws ParseException, IOException {
          Options opts = new Options();
          opts.addOption(JOYConstants.APP_ATTEMPT_ID, true,
                  "App Attempt ID. Not to be used unless for testing purposes");
          opts.addOption(JOYConstants.SHELL_SCRIPT, true,
                  "Environment for shell script. Specified as env_key=env_val pairs");
          opts.addOption(JOYConstants.CONTAINER_MEMORY, true,
                  "Amount of memory in MB to be requested to run the shell command");
          opts.addOption(JOYConstants.CONTAINER_VCORES, true,
                  "Amount of virtual cores to be requested to run the shell command");
          opts.addOption(JOYConstants.NUM_CONTAINERS, true,
                  "No. of containers on which the shell command needs to be executed");
          opts.addOption(JOYConstants.PRIORITY, true, "Application Priority. Default 0");
          opts.addOption(JOYConstants.DEBUG, false, "Dump out debug information");
          opts.addOption(JOYConstants.HELP, false, "Print usage");
          if (args.length == 0) {
              printUsage(opts);
              throw new IllegalArgumentException(
                      "No args specified for application master to initialize");
          }
  
          try {
              CommandLine cliParser = new GnuParser().parse(opts, args);
              JstormYarnUtils.checkAndSetMasterOptions(cliParser, jstormMasterContext, this.conf);
          } catch (Exception e) {
              LOG.error(e);
          }
          return true;
      }
docs: Parse command line options
  
  @param args Command line args
  @return Whether init successful and run should be invoked
  @throws ParseException
  @throws IOException