@Test(expected = JobConfigurationException.class) public void assertUpdateNotExisted() { when(configService.load("transient_test_job")).thenReturn(Optional.empty()); producerManager.update(transientJobConfig); }
public void update(final CloudJobConfigurationPOJO cloudJobConfig) { Optional<CloudJobConfigurationPOJO> jobConfigFromZk = configService.load(cloudJobConfig.getJobName()); if (!jobConfigFromZk.isPresent()) { throw new JobConfigurationException("Cannot found job '%s', please register first.", cloudJobConfig.getJobName()); } configService.update(cloudJobConfig); reschedule(cloudJobConfig.getJobName()); }
ProducerManager { public void update(final CloudJobConfigurationPOJO cloudJobConfig) { Optional<CloudJobConfigurationPOJO> jobConfigFromZk = configService.load(cloudJobConfig.getJobName()); if (!jobConfigFromZk.isPresent()) { throw new JobConfigurationException("Cannot found job '%s', please register first.", cloudJobConfig.getJobName()); } configService.update(cloudJobConfig); reschedule(cloudJobConfig.getJobName()); } }
ProducerManager { public void update(final CloudJobConfigurationPOJO cloudJobConfig) { Optional<CloudJobConfigurationPOJO> jobConfigFromZk = configService.load(cloudJobConfig.getJobName()); if (!jobConfigFromZk.isPresent()) { throw new JobConfigurationException("Cannot found job '%s', please register first.", cloudJobConfig.getJobName()); } configService.update(cloudJobConfig); reschedule(cloudJobConfig.getJobName()); } ProducerManager(final SchedulerDriver schedulerDriver, final CoordinatorRegistryCenter regCenter); }
ProducerManager { public void update(final CloudJobConfigurationPOJO cloudJobConfig) { Optional<CloudJobConfigurationPOJO> jobConfigFromZk = configService.load(cloudJobConfig.getJobName()); if (!jobConfigFromZk.isPresent()) { throw new JobConfigurationException("Cannot found job '%s', please register first.", cloudJobConfig.getJobName()); } configService.update(cloudJobConfig); reschedule(cloudJobConfig.getJobName()); } ProducerManager(final SchedulerDriver schedulerDriver, final CoordinatorRegistryCenter regCenter); void startup(); void register(final CloudJobConfigurationPOJO cloudJobConfig); void update(final CloudJobConfigurationPOJO cloudJobConfig); void deregister(final String jobName); void schedule(final CloudJobConfigurationPOJO cloudJobConfig); void unschedule(final String jobName); void reschedule(final String jobName); void sendFrameworkMessage(final ExecutorID executorId, final SlaveID slaveId, final byte[] data); void shutdown(); }
ProducerManager { public void update(final CloudJobConfigurationPOJO cloudJobConfig) { Optional<CloudJobConfigurationPOJO> jobConfigFromZk = configService.load(cloudJobConfig.getJobName()); if (!jobConfigFromZk.isPresent()) { throw new JobConfigurationException("Cannot found job '%s', please register first.", cloudJobConfig.getJobName()); } configService.update(cloudJobConfig); reschedule(cloudJobConfig.getJobName()); } ProducerManager(final SchedulerDriver schedulerDriver, final CoordinatorRegistryCenter regCenter); void startup(); void register(final CloudJobConfigurationPOJO cloudJobConfig); void update(final CloudJobConfigurationPOJO cloudJobConfig); void deregister(final String jobName); void schedule(final CloudJobConfigurationPOJO cloudJobConfig); void unschedule(final String jobName); void reschedule(final String jobName); void sendFrameworkMessage(final ExecutorID executorId, final SlaveID slaveId, final byte[] data); void shutdown();  }