[GitHub] [hudi] minihippo commented on a diff in pull request #7572: [HUDI-5483]Make retryhelper more suitable for common use.

2022-12-29 Thread GitBox


minihippo commented on code in PR #7572:
URL: https://github.com/apache/hudi/pull/7572#discussion_r1058989874


##
hudi-common/src/main/java/org/apache/hudi/common/util/RetryHelper.java:
##
@@ -120,7 +118,7 @@ private boolean checkIfExceptionInRetryList(Exception e) {
 
 // if users didn't set hoodie.filesystem.operation.retry.exceptions
 // we will retry all the IOException and RuntimeException
-if (retryExceptionsClasses.isEmpty()) {
+if (retryExceptionsClasses.equals(RETRY_EXCEPTION_CLASS)) {
   return true;
 }

Review Comment:
   fix



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



[GitHub] [hudi] minihippo commented on a diff in pull request #7572: [HUDI-5483]Make retryhelper more suitable for common use.

2022-12-29 Thread GitBox


minihippo commented on code in PR #7572:
URL: https://github.com/apache/hudi/pull/7572#discussion_r1058989340


##
hudi-common/src/main/java/org/apache/hudi/common/util/RetryHelper.java:
##
@@ -36,9 +36,10 @@
  *
  * @param  Type of return value for checked function.
  */
-public class RetryHelper implements Serializable {
+public class RetryHelper implements Serializable {
   private static final Logger LOG = LogManager.getLogger(RetryHelper.class);
-  private transient CheckedFunction func;
+  private static final List> 
RETRY_EXCEPTION_CLASS = Arrays.asList(IOException.class, 
RuntimeException.class);

Review Comment:
   fix
   



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



[GitHub] [hudi] minihippo commented on a diff in pull request #7572: [HUDI-5483]Make retryhelper more suitable for common use.

2022-12-28 Thread GitBox


minihippo commented on code in PR #7572:
URL: https://github.com/apache/hudi/pull/7572#discussion_r1058794357


##
hudi-common/src/main/java/org/apache/hudi/common/util/RetryHelper.java:
##
@@ -120,7 +118,7 @@ private boolean checkIfExceptionInRetryList(Exception e) {
 
 // if users didn't set hoodie.filesystem.operation.retry.exceptions
 // we will retry all the IOException and RuntimeException
-if (retryExceptionsClasses.isEmpty()) {
+if (retryExceptionsClasses.equals(RETRY_EXCEPTION_CLASS)) {
   return true;
 }

Review Comment:
   yes, e isn't in the list.



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