public Pair<Boolean, Pair<String, String>> hasCircle() {
        Map<String, Set<String>> priorityMap = Maps.newHashMap();
        for (StreamNodeRelation relation : pipeline) {
            Set<String> inputNodes = relation.getInputNodes();
            Set<String> outputNodes = relation.getOutputNodes();
            for (String inputNode : inputNodes) {
                for (String outputNode : outputNodes) {
                    priorityMap.computeIfAbsent(inputNode, key -> Sets.newHashSet()).add(outputNode);
                    if (CollectionUtils.isEmpty(priorityMap.get(outputNode))) {
                        continue;
                    }
                    Set<String> priorityNodesOfOutput = priorityMap.get(outputNode);
                    if (priorityNodesOfOutput.contains(inputNode)) {
                        return Pair.of(true, Pair.of(inputNode, outputNode));
                    } else {
                        if (isReach(priorityMap, priorityNodesOfOutput, inputNode)) {
                            return Pair.of(true, Pair.of(inputNode, outputNode));
                        }
                    }
                }
            }
        }
        return Pair.of(false, null);
    }
Check if a pipeline has a circle, if it has, return circled node names
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/stream/StreamPipeline.java