You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/07/01 08:15:17 UTC

[GitHub] [inlong] LvJiancheng commented on a diff in pull request #4832: [INLONG-4812][Manager] Choose the specified connector instead of all

LvJiancheng commented on code in PR #4832:
URL: https://github.com/apache/inlong/pull/4832#discussion_r911728489


##########
inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/flink/FlinkOperation.java:
##########
@@ -161,15 +174,46 @@ public void genPath(FlinkInfo flinkInfo, String dataflow) throws Exception {
         flinkInfo.setLocalJarPath(jarPath);
         log.info("get sort jar path success, path: {}", jarPath);
 
+        List<String> nodeTypes = new ArrayList<>();
+        if (StringUtils.isNotEmpty(dataflow)) {
+            JsonNode streams = JsonUtils.parseTree(dataflow).get(InlongConstants.STREAMS);
+            for (int i = 0; i < streams.size(); i++) {
+                JsonNode relations = streams.get(i).get(InlongConstants.RELATIONS);
+                for (int j = 0; j < relations.size(); j++) {
+                    String inputNames = OBJECT_MAPPER.convertValue(relations.get(j).get(InlongConstants.INPUTS),
+                                    new TypeReference<List<String>>(){}).stream().findFirst().orElse(null);
+                    String outputNames = OBJECT_MAPPER.convertValue(relations.get(j).get(InlongConstants.OUTPUTS),
+                            new TypeReference<List<String>>(){}).stream().findFirst().orElse(null);
+
+                    if (inputNames.equals(outputNames)) {
+                        String message = String.format("input nodeName: %s equals to output nodeName: %s",

Review Comment:
   ok 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org