use of com.alibaba.otter.node.etl.common.task.GlobalTask in project otter by alibaba.
the class OtterController method process.
public boolean process(List<NodeTask> nodeTasks) {
if (nodeTasks == null || nodeTasks.isEmpty()) {
return true;
}
for (NodeTask nodeTask : nodeTasks) {
boolean shutdown = nodeTask.isShutdown();
Long pipelineId = nodeTask.getPipeline().getId();
if (shutdown) {
Map<StageType, GlobalTask> tasks = controllers.remove(pipelineId);
if (tasks != null) {
logger.info("INFO ## shutdown this pipeline sync ,the pipelineId = {} and tasks = {}", pipelineId, tasks.keySet());
stopPipeline(pipelineId, tasks);
} else {
logger.info("INFO ## this pipeline id = {} is not start sync", pipelineId);
}
} else {
startPipeline(nodeTask);
}
}
return true;
}
Aggregations