vernedeng commented on code in PR #11835:
URL: https://github.com/apache/inlong/pull/11835#discussion_r2047156135


##########
inlong-sort/sort-flink/base/src/main/java/org/apache/inlong/sort/base/metric/CdcExactlyMetric.java:
##########
@@ -51,27 +48,12 @@ public CdcExactlyMetric(MetricOption option) {
         this.labels = option.getLabels();
         this.groupId = labels.get(GROUP_ID);
         this.streamId = labels.get(STREAM_ID);
-        this.auditKeyMap = new HashMap<>();
 
         if (option.getIpPorts().isPresent()) {
             auditReporter = new AuditReporterImpl();
             auditReporter.setAutoFlush(false);
             auditReporter.setAuditProxy(option.getIpPortSet());
-            List<Integer> auditKeys = option.getInlongAuditKeys();
-
-            if (CollectionUtils.isEmpty(auditKeys)) {
-                log.warn("inlong audit keys is empty");
-            } else if (auditKeys.size() == 1) {
-                auditKeyMap.put(RowKind.INSERT, auditKeys.get(0));
-                log.warn("only the insert audit key is set, the update and 
delete audit will be ignored");
-            } else if (auditKeys.size() == 4) {
-                auditKeyMap.put(RowKind.INSERT, auditKeys.get(0));
-                auditKeyMap.put(RowKind.UPDATE_BEFORE, auditKeys.get(1));
-                auditKeyMap.put(RowKind.UPDATE_AFTER, auditKeys.get(2));
-                auditKeyMap.put(RowKind.DELETE, auditKeys.get(3));
-            } else {
-                throw new IllegalArgumentException("audit key size must be 1 
or 4");
-            }
+            auditKeyMap = option.getInlongChangelogAuditKeys();

Review Comment:
   fixed, thx



-- 
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