[
https://issues.apache.org/jira/browse/GOBBLIN-2110?focusedWorklogId=926211&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-926211
]
ASF GitHub Bot logged work on GOBBLIN-2110:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 16/Jul/24 19:29
Start Date: 16/Jul/24 19:29
Worklog Time Spent: 10m
Work Description: 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
Issue Time Tracking
-------------------
Worklog Id: (was: 926211)
Time Spent: 0.5h (was: 20m)
> Make retry_exception_predicate configurable in RetryerFactory
> -------------------------------------------------------------
>
> Key: GOBBLIN-2110
> URL: https://issues.apache.org/jira/browse/GOBBLIN-2110
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Aditya Pratap Singh
> Priority: Minor
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Make retry_exception_predicate configurable in RetryerFactory
--
This message was sent by Atlassian Jira
(v8.20.10#820010)