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


##########
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:
   I guess the condition `event.isFailed()` is also verbose and unnecessary 
because when it's true, very probablily an exception throwned with empty write 
statuses.



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