@Test public void testSetJobIdManually() throws FlinkParseException { final JobID jobId = new JobID(); final String[] args = {"--configDir", "/foo/bar", "--job-classname", "foobar", "--job-id", jobId.toString()}; final StandaloneJobClusterConfiguration standaloneJobClusterConfiguration = commandLineParser.parse(args); assertThat(standaloneJobClusterConfiguration.getJobId(), is(equalTo(jobId))); }
private static JobID getJobId(CommandLine commandLine) throws FlinkParseException { String jobId = commandLine.getOptionValue(JOB_ID_OPTION.getOpt()); if (jobId == null) { return DEFAULT_JOB_ID; } try { return JobID.fromHexString(jobId); } catch (IllegalArgumentException e) { throw createFlinkParseException(JOB_ID_OPTION, e); } }
StandaloneJobClusterConfigurationParserFactory implements ParserResultFactory<StandaloneJobClusterConfiguration> { private static JobID getJobId(CommandLine commandLine) throws FlinkParseException { String jobId = commandLine.getOptionValue(JOB_ID_OPTION.getOpt()); if (jobId == null) { return DEFAULT_JOB_ID; } try { return JobID.fromHexString(jobId); } catch (IllegalArgumentException e) { throw createFlinkParseException(JOB_ID_OPTION, e); } } }
StandaloneJobClusterConfigurationParserFactory implements ParserResultFactory<StandaloneJobClusterConfiguration> { private static JobID getJobId(CommandLine commandLine) throws FlinkParseException { String jobId = commandLine.getOptionValue(JOB_ID_OPTION.getOpt()); if (jobId == null) { return DEFAULT_JOB_ID; } try { return JobID.fromHexString(jobId); } catch (IllegalArgumentException e) { throw createFlinkParseException(JOB_ID_OPTION, e); } }  }
StandaloneJobClusterConfigurationParserFactory implements ParserResultFactory<StandaloneJobClusterConfiguration> { private static JobID getJobId(CommandLine commandLine) throws FlinkParseException { String jobId = commandLine.getOptionValue(JOB_ID_OPTION.getOpt()); if (jobId == null) { return DEFAULT_JOB_ID; } try { return JobID.fromHexString(jobId); } catch (IllegalArgumentException e) { throw createFlinkParseException(JOB_ID_OPTION, e); } }  @Override Options getOptions(); @Override StandaloneJobClusterConfiguration createResult(@Nonnull CommandLine commandLine); }
StandaloneJobClusterConfigurationParserFactory implements ParserResultFactory<StandaloneJobClusterConfiguration> { private static JobID getJobId(CommandLine commandLine) throws FlinkParseException { String jobId = commandLine.getOptionValue(JOB_ID_OPTION.getOpt()); if (jobId == null) { return DEFAULT_JOB_ID; } try { return JobID.fromHexString(jobId); } catch (IllegalArgumentException e) { throw createFlinkParseException(JOB_ID_OPTION, e); } }  @Override Options getOptions(); @Override StandaloneJobClusterConfiguration createResult(@Nonnull CommandLine commandLine);  }