zhuanshenbsj1 commented on code in PR #9680:
URL: https://github.com/apache/hudi/pull/9680#discussion_r1325566134


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/utils/Pipelines.java:
##########
@@ -482,7 +486,8 @@ public static String opName(String operatorN, Configuration 
conf) {
   }
 
   public static String opUID(String operatorN, Configuration conf) {
-    return "uid_" + operatorN + "_" + getTablePath(conf);
+    Integer operatorCount = OPERATOR_COUNTERS.merge(operatorN, 1, (oldValue, 
value) -> oldValue + value);
+    return "uid_" + operatorN + (operatorCount == 1 ? "" : "_" + 
(operatorCount - 1)) + "_" + getTablePath(conf);

Review Comment:
   This is a counter, starting from 1 is logical. For example, operator 'a' is 
repeated three times in flink job,The following uids will be generated: 
   uid_a, uid_ a_ 1, uid_ a_ 2
   You mean to generate like this: 
   uid_a_0, uid_ a_ 1, uid_ a_ 2 ?
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to