@Test public void createLegacySchedulerFactoryByDefault() { final SchedulerNGFactory schedulerNGFactory = createSchedulerNGFactory(new Configuration()); assertThat(schedulerNGFactory, is(instanceOf(LegacySchedulerFactory.class))); }
static SchedulerNGFactory createSchedulerNGFactory( final Configuration configuration, final RestartStrategyFactory restartStrategyFactory) { final String schedulerName = configuration.getString(JobManagerOptions.SCHEDULER); switch (schedulerName) { case "legacy": return new LegacySchedulerFactory(restartStrategyFactory); case "ng": return new DefaultSchedulerFactory(); default: throw new IllegalArgumentException(String.format( "Illegal value [%s] for config option [%s]", schedulerName, JobManagerOptions.SCHEDULER.key())); } }
SchedulerNGFactoryFactory { static SchedulerNGFactory createSchedulerNGFactory( final Configuration configuration, final RestartStrategyFactory restartStrategyFactory) { final String schedulerName = configuration.getString(JobManagerOptions.SCHEDULER); switch (schedulerName) { case "legacy": return new LegacySchedulerFactory(restartStrategyFactory); case "ng": return new DefaultSchedulerFactory(); default: throw new IllegalArgumentException(String.format( "Illegal value [%s] for config option [%s]", schedulerName, JobManagerOptions.SCHEDULER.key())); } } }
SchedulerNGFactoryFactory { static SchedulerNGFactory createSchedulerNGFactory( final Configuration configuration, final RestartStrategyFactory restartStrategyFactory) { final String schedulerName = configuration.getString(JobManagerOptions.SCHEDULER); switch (schedulerName) { case "legacy": return new LegacySchedulerFactory(restartStrategyFactory); case "ng": return new DefaultSchedulerFactory(); default: throw new IllegalArgumentException(String.format( "Illegal value [%s] for config option [%s]", schedulerName, JobManagerOptions.SCHEDULER.key())); } } private  SchedulerNGFactoryFactory(); }
SchedulerNGFactoryFactory { static SchedulerNGFactory createSchedulerNGFactory( final Configuration configuration, final RestartStrategyFactory restartStrategyFactory) { final String schedulerName = configuration.getString(JobManagerOptions.SCHEDULER); switch (schedulerName) { case "legacy": return new LegacySchedulerFactory(restartStrategyFactory); case "ng": return new DefaultSchedulerFactory(); default: throw new IllegalArgumentException(String.format( "Illegal value [%s] for config option [%s]", schedulerName, JobManagerOptions.SCHEDULER.key())); } } private  SchedulerNGFactoryFactory();  }
SchedulerNGFactoryFactory { static SchedulerNGFactory createSchedulerNGFactory( final Configuration configuration, final RestartStrategyFactory restartStrategyFactory) { final String schedulerName = configuration.getString(JobManagerOptions.SCHEDULER); switch (schedulerName) { case "legacy": return new LegacySchedulerFactory(restartStrategyFactory); case "ng": return new DefaultSchedulerFactory(); default: throw new IllegalArgumentException(String.format( "Illegal value [%s] for config option [%s]", schedulerName, JobManagerOptions.SCHEDULER.key())); } } private  SchedulerNGFactoryFactory();   }