danny0405 commented on code in PR #12666:
URL: https://github.com/apache/hudi/pull/12666#discussion_r2153368286
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/append/AppendWriteFunction.java:
##########
@@ -162,4 +169,25 @@ private void registerMetrics() {
writeMetrics = new FlinkStreamWriteMetrics(metrics);
writeMetrics.registerMetrics();
}
+
+ static void validateWriteStatus(
+ Configuration config,
+ String currentInstant,
+ List<WriteStatus> writeStatus) throws HoodieException {
+ if (config.get(FAIL_FAST)) {
+ // It will early detect any write failures in each of task to prevent
data loss caused by commit failure
+ // after a checkpoint is finished successfully.
+ Map.Entry<HoodieKey, Throwable> firstFailure = null;
Review Comment:
let's use Java stream API? like `list.stream.anyMatch(ws ->
ws.getErrors.size > ))`
--
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]