KeeProMise commented on code in PR #6888:
URL: https://github.com/apache/hadoop/pull/6888#discussion_r1685887046
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java:
##########
@@ -96,6 +96,8 @@ public class Client implements AutoCloseable {
private static final ThreadLocal<Integer> retryCount = new
ThreadLocal<Integer>();
private static final ThreadLocal<Object> EXTERNAL_CALL_HANDLER
= new ThreadLocal<>();
+ public static final ThreadLocal<CompletableFuture<Object>>
CALL_FUTURE_THREAD_LOCAL
+ = new ThreadLocal<>();
private static final ThreadLocal<AsyncGet<? extends Writable, IOException>>
ASYNC_RPC_RESPONSE = new ThreadLocal<>();
Review Comment:
@szetszwo Hi, thanks for you review! Do you mean that I need to delete this
Client.ASYNC_RPC_RESPONSE, and then use CompletableFuture in all places where
ASYNC_RPC_RESPONSE is used? Such modification may require repairing many unit
tests, because ASYNC_RPC_RESPONSE is used by many unit tests, and
ProtobufRpcEngine2 and ProtobufRpcEngine also use ASYNC_RPC_RESPONSE. If I
delete ASYNC_RPC_RESPONSE, then how should the ASYNC_RETURN_MESSAGE attribute
of ProtobufRpcEngine2 and ProtobufRpcEngine be processed? Is it also needed to
removed and use CompletableFuture? which may affect more unit tests and code.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]