public static CommandLine parse(Options options, String[] args, boolean stopAtNonOptions) throws CliArgsException { final DefaultParser parser = new DefaultParser(); try { return parser.parse(options, args, stopAtNonOptions); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }
private JobID parseJobId(String jobIdString) throws CliArgsException { JobID jobId; try { jobId = JobID.fromHexString(jobIdString); } catch (IllegalArgumentException e) { throw new CliArgsException(e.getMessage()); } return jobId; }
public static RunOptions parseRunCommand(String[] args) throws CliArgsException { try { DefaultParser parser = new DefaultParser(); CommandLine line = parser.parse(RUN_OPTIONS, args, true); return new RunOptions(line); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }
classpaths.add(new URL(path)); } catch (MalformedURLException e) { throw new CliArgsException("Bad syntax for classpath: " + path); throw new CliArgsException("The parallelism must be a positive number: " + parString);
jobId = parseJobId(modifyArgs[0]); } else { throw new CliArgsException("Missing JobId"); newParallelism = Integer.parseInt(commandLine.getOptionValue(MODIFY_PARALLELISM_OPTION.getOpt())); } catch (NumberFormatException e) { throw new CliArgsException("Could not parse the parallelism which is supposed to be an integer.", e); throw new CliArgsException("Missing new parallelism.");
throw new CliArgsException("The program JAR file was not specified."); throw new CliArgsException("Could not build the program from JAR file.", e);
throw new CliArgsException("The program JAR file was not specified.");
jobId = parseJobId(jobIdString); } else { throw new CliArgsException("Missing JobID");
throw new CliArgsException("Missing JobID. " + "Specify a Job ID to trigger a savepoint.");
jobId = parseJobId(cleanedArgs[0]); } else { throw new CliArgsException("Missing JobID. Specify a JobID to cancel a job.");
private JobID parseJobId(String jobIdString) throws CliArgsException { JobID jobId; try { jobId = JobID.fromHexString(jobIdString); } catch (IllegalArgumentException e) { throw new CliArgsException(e.getMessage()); } return jobId; }
private JobID parseJobId(String jobIdString) throws CliArgsException { JobID jobId; try { jobId = JobID.fromHexString(jobIdString); } catch (IllegalArgumentException e) { throw new CliArgsException(e.getMessage()); } return jobId; }
public static RunOptions parseRunCommand(String[] args) throws CliArgsException { try { DefaultParser parser = new DefaultParser(); CommandLine line = parser.parse(RUN_OPTIONS, args, true); return new RunOptions(line); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }
public static RunOptions parseRunCommand(String[] args) throws CliArgsException { try { DefaultParser parser = new DefaultParser(); CommandLine line = parser.parse(RUN_OPTIONS, args, true); return new RunOptions(line); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }
public static InfoOptions parseInfoCommand(String[] args) throws CliArgsException { try { DefaultParser parser = new DefaultParser(); CommandLine line = parser.parse(INFO_OPTIONS, args, true); return new InfoOptions(line); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }
public static CancelOptions parseCancelCommand(String[] args) throws CliArgsException { try { DefaultParser parser = new DefaultParser(); CommandLine line = parser.parse(CANCEL_OPTIONS, args, false); return new CancelOptions(line); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }
public static StopOptions parseStopCommand(String[] args) throws CliArgsException { try { DefaultParser parser = new DefaultParser(); CommandLine line = parser.parse(STOP_OPTIONS, args, false); return new StopOptions(line); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }
public static RunOptions parseRunCommand(String[] args) throws CliArgsException { try { DefaultParser parser = new DefaultParser(); CommandLine line = parser.parse(RUN_OPTIONS, args, true); return new RunOptions(line); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }
public static ListOptions parseListCommand(String[] args) throws CliArgsException { try { DefaultParser parser = new DefaultParser(); CommandLine line = parser.parse(LIST_OPTIONS, args, false); return new ListOptions(line); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }
public static SavepointOptions parseSavepointCommand(String[] args) throws CliArgsException { try { DefaultParser parser = new DefaultParser(); CommandLine line = parser.parse(SAVEPOINT_OPTIONS, args, false); return new SavepointOptions(line); } catch (ParseException e) { throw new CliArgsException(e.getMessage()); } }