Skip to content

Commit 518b109

Browse files
committed
async util
1 parent 65c5bc4 commit 518b109

File tree

1 file changed

+2
-1
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async

1 file changed

+2
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async/AsyncUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.Collection;
2222
import java.util.Iterator;
2323
import java.util.concurrent.CompletableFuture;
24+
import java.util.concurrent.CompletionException;
2425
import java.util.concurrent.ExecutionException;
2526
import java.util.concurrent.Executor;
2627
import java.util.function.Function;
@@ -120,7 +121,7 @@ public static <R> void asyncComplete(R value) {
120121
*/
121122
public static void asyncThrowException(Throwable e) {
122123
CompletableFuture<Object> result = new CompletableFuture<>();
123-
result.completeExceptionally(e);
124+
result.completeExceptionally(new CompletionException(e));
124125
CUR_COMPLETABLE_FUTURE.set(result);
125126
}
126127

0 commit comments

Comments
 (0)