public static <T> CompletableFuture<T> failedFuture(Throwable t) {
    final CompletableFuture<T> cf = new CompletableFuture<>();
    cf.completeExceptionally(t);
    return cf;
  }
Helper method to convert: {@code Map<K, CompletableFuture<V>>}
to:                       {@code CompletableFuture<Map<K, V>>}

Returns a future that completes with successful map entries, skipping any entries with ignored errors,
when all value futures complete.
Returned future completes exceptionally if any of the futures complete with a non-ignored error.
samza-core/src/main/java/org/apache/samza/util/FutureUtil.java