You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/09/09 14:08:44 UTC

[GitHub] [hive] hmangla98 commented on a change in pull request #2516: HIVE-25330: Make FS calls in CopyUtils retryable

hmangla98 commented on a change in pull request #2516:
URL: https://github.com/apache/hive/pull/2516#discussion_r705371253



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/util/Retryable.java
##########
@@ -166,6 +169,25 @@ public synchronized Builder withRetryOnExceptionList(final List<Class<? extends
       return this;
     }
 
+    public synchronized Builder withFailOnParentException(final Class<? extends Exception> exceptionClass) {
+      if (exceptionClass != null &&
+              runnable.failOnParentExceptions.stream().noneMatch(k -> exceptionClass.equals(k))) {
+        runnable.failOnParentExceptions.add(exceptionClass);
+      }
+      return this;
+    }
+
+    public synchronized Builder withFailOnParentExceptionList(final List<Class<?
+            extends Exception>> exceptionClassList) {
+      for (final Class<? extends Exception> exceptionClass : exceptionClassList) {
+        if (exceptionClass != null &&
+                runnable.failOnParentExceptions.stream().noneMatch(k -> exceptionClass.equals(k))) {
+          runnable.failOnParentExceptions.add(exceptionClass);
+        }

Review comment:
       we are using the same data structure to maintain retryOnExceptionList and failOnExceptionList also.




-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org