prateekm commented on code in PR #1650:
URL: https://github.com/apache/samza/pull/1650#discussion_r1086022385


##########
samza-core/src/main/java/org/apache/samza/util/FutureUtil.java:
##########
@@ -143,16 +144,16 @@ public static <K, V> CompletableFuture<Map<K, V>> 
toFutureOfMap(
   }
 
   public static <T> CompletableFuture<T> executeAsyncWithRetries(String opName,
-      Supplier<? extends CompletionStage<T>> action,
-      Predicate<? extends Throwable> abortRetries,
-      ExecutorService executor) {
-    Duration maxDuration = Duration.ofMinutes(10);
-
-    RetryPolicy<Object> retryPolicy = new RetryPolicy<>()
-        .withMaxRetries(-1) // Sets maximum retry to unlimited from default of 
3 attempts. Retries are now limited by max duration and not retry counts.
-        .withBackoff(100, 312500, ChronoUnit.MILLIS, 5) // 100 ms, 500 ms, 
2500 ms, 12.5 s, 1.05 min, 5.20 min, 5.20 min
-        .withMaxDuration(maxDuration)
-        .abortOn(abortRetries) // stop retrying if predicate returns true
+      Supplier<? extends CompletionStage<T>> action, Predicate<? extends 
Throwable> abortRetries,
+      ExecutorService executor, BlobStoreConfig blobStoreConfig) {

Review Comment:
   Use-case-agnostic util class should not take use case specific parameters 
(blob store config).



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