@Test public void assertIsTaskRunning() { assertTrue(runningService.isTaskRunning(MetaInfo.from(TaskNode.builder().build().getTaskNodePath()))); }
public boolean isTaskRunning(final MetaInfo metaInfo) { for (TaskContext each : getRunningTasks(metaInfo.getJobName())) { if (each.getMetaInfo().equals(metaInfo)) { return true; } } return false; }
RunningService { public boolean isTaskRunning(final MetaInfo metaInfo) { for (TaskContext each : getRunningTasks(metaInfo.getJobName())) { if (each.getMetaInfo().equals(metaInfo)) { return true; } } return false; } }
RunningService { public boolean isTaskRunning(final MetaInfo metaInfo) { for (TaskContext each : getRunningTasks(metaInfo.getJobName())) { if (each.getMetaInfo().equals(metaInfo)) { return true; } } return false; } RunningService(final CoordinatorRegistryCenter regCenter); }
RunningService { public boolean isTaskRunning(final MetaInfo metaInfo) { for (TaskContext each : getRunningTasks(metaInfo.getJobName())) { if (each.getMetaInfo().equals(metaInfo)) { return true; } } return false; } RunningService(final CoordinatorRegistryCenter regCenter); void start(); void add(final TaskContext taskContext); void updateIdle(final TaskContext taskContext, final boolean isIdle); void remove(final String jobName); void remove(final TaskContext taskContext); boolean isJobRunning(final String jobName); boolean isTaskRunning(final MetaInfo metaInfo); Collection<TaskContext> getRunningTasks(final String jobName); Map<String, Set<TaskContext>> getAllRunningTasks(); Set<TaskContext> getAllRunningDaemonTasks(); void addMapping(final String taskId, final String hostname); String popMapping(final String taskId); void clear(); }
RunningService { public boolean isTaskRunning(final MetaInfo metaInfo) { for (TaskContext each : getRunningTasks(metaInfo.getJobName())) { if (each.getMetaInfo().equals(metaInfo)) { return true; } } return false; } RunningService(final CoordinatorRegistryCenter regCenter); void start(); void add(final TaskContext taskContext); void updateIdle(final TaskContext taskContext, final boolean isIdle); void remove(final String jobName); void remove(final TaskContext taskContext); boolean isJobRunning(final String jobName); boolean isTaskRunning(final MetaInfo metaInfo); Collection<TaskContext> getRunningTasks(final String jobName); Map<String, Set<TaskContext>> getAllRunningTasks(); Set<TaskContext> getAllRunningDaemonTasks(); void addMapping(final String taskId, final String hostname); String popMapping(final String taskId); void clear();  }