@Test public void assertDeregisterExisted() { when(configService.load("transient_test_job")).thenReturn(Optional.of(transientJobConfig)); List<TaskContext> taskContexts = Arrays.asList( TaskContext.from("transient_test_job@-@0@-@READY@-@SLAVE-S0@-@UUID"), TaskContext.from("transient_test_job@-@1@-@READY@-@SLAVE-S0@-@UUID")); when(runningService.getRunningTasks("transient_test_job")).thenReturn(taskContexts); producerManager.deregister("transient_test_job"); for (TaskContext each : taskContexts) { verify(schedulerDriver).killTask(Protos.TaskID.newBuilder().setValue(each.getId()).build()); } verify(disableJobService).remove("transient_test_job"); verify(configService).remove("transient_test_job"); verify(runningService).remove("transient_test_job"); verify(readyService).remove(Collections.singletonList("transient_test_job")); }
public void deregister(final String jobName) { Optional<CloudJobConfigurationPOJO> jobConfig = configService.load(jobName); if (jobConfig.isPresent()) { disableJobService.remove(jobName); configService.remove(jobName); } unschedule(jobName); }
ProducerManager { public void deregister(final String jobName) { Optional<CloudJobConfigurationPOJO> jobConfig = configService.load(jobName); if (jobConfig.isPresent()) { disableJobService.remove(jobName); configService.remove(jobName); } unschedule(jobName); } }
ProducerManager { public void deregister(final String jobName) { Optional<CloudJobConfigurationPOJO> jobConfig = configService.load(jobName); if (jobConfig.isPresent()) { disableJobService.remove(jobName); configService.remove(jobName); } unschedule(jobName); } ProducerManager(final SchedulerDriver schedulerDriver, final CoordinatorRegistryCenter regCenter); }
ProducerManager { public void deregister(final String jobName) { Optional<CloudJobConfigurationPOJO> jobConfig = configService.load(jobName); if (jobConfig.isPresent()) { disableJobService.remove(jobName); configService.remove(jobName); } unschedule(jobName); } 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 deregister(final String jobName) { Optional<CloudJobConfigurationPOJO> jobConfig = configService.load(jobName); if (jobConfig.isPresent()) { disableJobService.remove(jobName); configService.remove(jobName); } unschedule(jobName); } 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();  }