arjun4084346 commented on code in PR #4001:
URL: https://github.com/apache/gobblin/pull/4001#discussion_r1679969669
##########
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:
lets not add something to the param that can be constructer using the
existing param.
lets move `Predicate<Throwable> retryPredicate =
getRetryPredicateFromConfigOrDefault(config);` inside `newFixedRetryerBuilder`
and other builders
##########
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:
lets not add something to the param that can be constructed using the
existing param.
lets move `Predicate<Throwable> retryPredicate =
getRetryPredicateFromConfigOrDefault(config);` inside `newFixedRetryerBuilder`
and other builders
--
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]