FlinkJobServerDriver extends JobServerDriver { public static FlinkServerConfiguration parseArgs(String[] args) { FlinkServerConfiguration configuration = new FlinkServerConfiguration(); CmdLineParser parser = new CmdLineParser(configuration); try { parser.parseArgument(args); } catch (CmdLineException e) { LOG.error("Unable to parse command line arguments.", e); printUsage(parser); throw new IllegalArgumentException("Unable to parse command line arguments.", e); } return configuration; } private  FlinkJobServerDriver(
      FlinkServerConfiguration configuration,
      ServerFactory jobServerFactory,
      ServerFactory artifactServerFactory,
      JobInvokerFactory jobInvokerFactory); static void main(String[] args); static FlinkServerConfiguration parseArgs(String[] args); static FlinkJobServerDriver fromParams(String[] args); static FlinkJobServerDriver fromConfig(FlinkServerConfiguration configuration); static FlinkJobServerDriver fromConfig(
      FlinkServerConfiguration configuration, JobInvokerFactory jobInvokerFactory);  }
@Test public void testConfigurationFromArgs() { FlinkJobServerDriver.FlinkServerConfiguration config = FlinkJobServerDriver.parseArgs( new String[] { "--job-host=test", "--job-port", "42", "--artifact-port", "43", "--expansion-port", "44", "--flink-master=jobmanager", "--clean-artifacts-per-job=false", }); assertThat(config.getHost(), is("test")); assertThat(config.getPort(), is(42)); assertThat(config.getArtifactPort(), is(43)); assertThat(config.getExpansionPort(), is(44)); assertThat(config.getFlinkMaster(), is("jobmanager")); assertThat(config.isCleanArtifactsPerJob(), is(false)); }
@Test public void testLegacyMasterUrlParameter() { FlinkJobServerDriver.FlinkServerConfiguration config = FlinkJobServerDriver.parseArgs( new String[] { "--flink-master-url=jobmanager", }); assertThat(config.getFlinkMaster(), is("jobmanager")); }