wombatu-kun commented on code in PR #19030:
URL: https://github.com/apache/hudi/pull/19030#discussion_r3426031054


##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/table/ITTestHoodieDataSource.java:
##########
@@ -4012,4 +4048,28 @@ private static boolean 
containsReadNextRowGroupFrame(Throwable t) {
     }
     return false;
   }
+
+  /**
+   * Whether {@code e} (or any of its causes) is the normal {@link 
CollectSinkTableFactory.SuccessException}
+   * terminator (the happy path), as opposed to one of the tolerated 
teardown-race symptoms.
+   */
+  private static boolean isSuccessException(Throwable e) {
+    for (Throwable cur = e; cur != null; cur = cur.getCause()) {
+      if (cur instanceof CollectSinkTableFactory.SuccessException) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Short description of {@code e}'s root cause, for logging which tolerated 
terminal failure fired.
+   */
+  private static String describeTerminalCause(Throwable e) {
+    Throwable root = e;
+    while (root.getCause() != null) {
+      root = root.getCause();
+    }
+    return root.getClass().getName() + ": " + root.getMessage();

Review Comment:
   Done b7f334f



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