public static List<NodeRelation> createNodeRelations(InlongStreamInfo streamInfo) {
        if (StringUtils.isEmpty(streamInfo.getExtParams())) {
            log.warn("stream node relation is empty for {}", streamInfo);
            return Lists.newArrayList();
        }
        StreamPipeline pipeline = StreamParseUtils.parseStreamPipeline(streamInfo.getExtParams(),
                streamInfo.getInlongStreamId());
        return pipeline.getPipeline().stream()
                .map(nodeRelation -> {
                    if (nodeRelation.getInputNodes().size() > 1) {
                        return new UnionNodeRelation(
                                Lists.newArrayList(nodeRelation.getInputNodes()),
                                Lists.newArrayList(nodeRelation.getOutputNodes()));
                    } else {
                        return new NodeRelation(
                                Lists.newArrayList(nodeRelation.getInputNodes()),
                                Lists.newArrayList(nodeRelation.getOutputNodes()));
                    }
                }).collect(Collectors.toList());
    }
Create node relation for the given stream
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/util/NodeRelationUtils.java