pratapaditya04 commented on code in PR #4001:
URL: https://github.com/apache/gobblin/pull/4001#discussion_r1680552636


##########
gobblin-utility/src/main/java/org/apache/gobblin/util/retry/RetryerFactory.java:
##########
@@ -53,10 +59,14 @@ public class RetryerFactory<T> {
   // value large or equal to 1
   public static final String RETRY_TIMES = "retry_times";
 
-  private static final Predicate<Throwable> RETRY_EXCEPTION_PREDICATE;
+  // Key to store a comma-separated list of exception class names that should 
be retried
+  public static final String EXCEPTION_LIST_FOR_RETRY_CONFIG_KEY = 
"EXCEPTION_LIST_FOR_RETRY";

Review Comment:
   makes sense, addressed



##########
gobblin-utility/src/main/java/org/apache/gobblin/util/retry/RetryerFactory.java:
##########
@@ -87,15 +97,18 @@ public static <T> Retryer<T> newInstance(Config config, 
Optional<RetryListener>
     RetryType type = 
RetryType.valueOf(config.getString(RETRY_TYPE).toUpperCase());
 
     RetryerBuilder<T> builder;
+
+    Predicate<Throwable> retryPredicate = 
getRetryPredicateFromConfigOrDefault(config);
+
     switch (type) {
       case EXPONENTIAL:
-        builder = newExponentialRetryerBuilder(config);
+        builder = newExponentialRetryerBuilder(config, retryPredicate);
         break;
       case FIXED:
-        builder = newFixedRetryerBuilder(config);
+        builder = newFixedRetryerBuilder(config, retryPredicate);

Review Comment:
   addressed



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