You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Jian Zhang (Jira)" <ji...@apache.org> on 2024/06/13 16:20:00 UTC
[jira] [Created] (HDFS-17552) [ARR] RPC client uses CompletableFuture to support asynchronous operations.
Jian Zhang created HDFS-17552:
---------------------------------
Summary: [ARR] RPC client uses CompletableFuture to support asynchronous operations.
Key: HDFS-17552
URL: https://issues.apache.org/jira/browse/HDFS-17552
Project: Hadoop HDFS
Issue Type: Sub-task
Reporter: Jian Zhang
h3. Description
In the implementation of asynchronous Rpc.client, the main methods used include HADOOP-13226, HDFS-10224, etc.
However, the existing implementation does not support `CompletableFuture`; instead, it relies on setting up callbacks, which can lead to the "callback hell" problem. Using `CompletableFuture` can better organize asynchronous callbacks. Therefore, on the basis of the existing implementation, by using `CompletableFuture`, once the `client.call` is completed, the asynchronous thread handles the response of this call without blocking the main thread.
*Test*
new UT ** TestAsyncIPC#testAsyncCallWithCompletableFuture()
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org