beyond1920 commented on code in PR #9153:
URL: https://github.com/apache/hudi/pull/9153#discussion_r1257883937


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/SparkRDDTableServiceClient.java:
##########
@@ -291,6 +287,13 @@ private void 
completeClustering(HoodieReplaceCommitMetadata metadata,
     LOG.info("Clustering successfully on commit " + clusteringCommitTime);
   }
 
+  private void handleWriteErrors(List<HoodieWriteStat> writeStats, 
TableServiceType tableServiceType) {
+    if 
(writeStats.stream().mapToLong(HoodieWriteStat::getTotalWriteErrors).sum() > 0) 
{
+      throw new HoodieClusteringException(tableServiceType + " failed to write 
to files:"
+          + writeStats.stream().filter(s -> s.getTotalWriteErrors() > 
0L).map(HoodieWriteStat::getFileId).collect(Collectors.joining(",")));

Review Comment:
   I prefer to throw exception in this case to avoid unexpected behavior later.



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