public void startPipeline(NodeTask nodeTask) {
        Long pipelineId = nodeTask.getPipeline().getId();
        releasePipeline(pipelineId);
        Map<StageType, GlobalTask> tasks = controllers.get(pipelineId);
        // 处理具体的任务命令
        List<StageType> stage = nodeTask.getStage();
        List<TaskEvent> event = nodeTask.getEvent();
        for (int i = 0; i < stage.size(); i++) {
            StageType stageType = stage.get(i);
            TaskEvent taskEvent = event.get(i);
            if (taskEvent.isCreate()) {
                startTask(nodeTask.getPipeline(), tasks, stageType);
            } else {
                stopTask(tasks, stageType);
            }
        }
    }
public void startPipeline ( NodeTask nodeTask ) { Long pipelineId = nodeTask . getPipeline ( ) . getId ( ) ; releasePipeline ( pipelineId ) ; Map < StageType , GlobalTask > tasks = controllers . get ( pipelineId ) ; List < StageType > stage = nodeTask . getStage ( ) ; List < TaskEvent > event = nodeTask . getEvent ( ) ; for ( int i = 0 ; i < stage . size ( ) ; i ++ ) { StageType stageType = stage . get ( i ) ; TaskEvent taskEvent = event . get ( i ) ; if ( taskEvent . isCreate ( ) ) { startTask ( nodeTask . getPipeline ( ) , tasks , stageType ) ; } else { stopTask ( tasks , stageType ) ; } } }
===================== helper method ======================