hbgstc123 commented on code in PR #8546:
URL: https://github.com/apache/hudi/pull/8546#discussion_r1178594690


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/clustering/ClusteringCommitSink.java:
##########
@@ -97,6 +97,11 @@ public void open(Configuration parameters) throws Exception {
   @Override
   public void invoke(ClusteringCommitEvent event, Context context) throws 
Exception {
     final String instant = event.getInstant();
+    if (event.isFailed() || 
event.getWriteStatuses().stream().anyMatch(writeStatus -> 
writeStatus.getTotalErrorRecords() > 0)) {
+      LOG.warn("Receive abnormal ClusteringCommitEvent of instant " + instant 
+ ", task ID is " + event.getTaskID()
+              + ", is failed: " + event.isFailed() + ", error record count: "

Review Comment:
   If "an exception throwned with empty write statuses" the second condition 
`event.getWriteStatuses().stream().anyMatch(writeStatus -> 
writeStatus.getTotalErrorRecords() > 0)` will be false, 
    thus in this scene we will need the condition `event.isFailed()` to trigger 
the log, so seems like we need the condition `event.isFailed()` here?



-- 
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-unsubscr...@hudi.apache.org

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

Reply via email to