public static <T> CompletableFuture<T> wrapFuture(CompletableFuture<T> future,
    Executor executor) {
    CompletableFuture<T> wrappedFuture = new CompletableFuture<>();
    addListener(future, (r, e) -> {
      if (e != null) {
        wrappedFuture.completeExceptionally(e);
      } else {
        wrappedFuture.complete(r);
      }
    }, executor);
    return wrappedFuture;
  }
Return a {@link CompletableFuture} which is same with the given {@code future}, but execute all
the callbacks in the given {@code executor}.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/FutureUtils.java