pipelineDao.insert(pipelineDo);
List<PipelineNodeRelationDO> pipelineNodeRelationDos = new ArrayList<PipelineNodeRelationDO>();
for (Node node : pipeline.getSelectNodes()) {
PipelineNodeRelationDO pipelineNodeRelationDo = new PipelineNodeRelationDO();
pipelineNodeRelationDo.setPipelineId(pipelineDo.getId());
pipelineNodeRelationDo.setNodeId(node.getId());
pipelineNodeRelationDo.setLocation(Location.SELECT);
pipelineNodeRelationDos.add(pipelineNodeRelationDo);
}
for (Node node : pipeline.getExtractNodes()) {
PipelineNodeRelationDO pipelineNodeRelationDo = new PipelineNodeRelationDO();
pipelineNodeRelationDo.setPipelineId(pipelineDo.getId());
pipelineNodeRelationDo.setNodeId(node.getId());
pipelineNodeRelationDo.setLocation(Location.EXTRACT);
pipelineNodeRelationDos.add(pipelineNodeRelationDo);
}
for (Node node : pipeline.getLoadNodes()) {
PipelineNodeRelationDO pipelineNodeRelationDo = new PipelineNodeRelationDO();
pipelineNodeRelationDo.setPipelineId(pipelineDo.getId());
pipelineNodeRelationDo.setNodeId(node.getId());
pipelineNodeRelationDo.setLocation(Location.LOAD);
pipelineNodeRelationDos.add(pipelineNodeRelationDo);
}
pipelineNodeRelationDao.insertBatch(pipelineNodeRelationDos);
arbitrateManageService.pipelineEvent().init(pipelineDo.getChannelId(), pipelineDo.getId());