shekhars-li commented on code in PR #1676:
URL: https://github.com/apache/samza/pull/1676#discussion_r1286275278


##########
samza-core/src/main/java/org/apache/samza/util/FutureUtil.java:
##########
@@ -139,6 +139,17 @@ public static <K, V> CompletableFuture<Map<K, V>> 
toFutureOfMap(
     });
   }
 
+  /**
+   * Helper method to convert: {@code Map<K, CompletionStage<Void>>}
+   * to:                       {@code CompletableFuture<Void>}
+   *
+   * Returns a future that completes when all value futures complete.
+   * Returned future completes exceptionally if any of the value futures 
complete exceptionally.
+   */
+  public static CompletableFuture<Void> mapToFuture(Map<String, 
CompletionStage<Void>> map) {

Review Comment:
   They are different methods. This one creates a future to ensure all 
removeTTLFutures in the map completes. We don't care about individual k, v. The 
other method returns a future of map. 



-- 
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: commits-unsubscr...@samza.apache.org

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

Reply via email to