[ 
https://issues.apache.org/jira/browse/HADOOP-12909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15194662#comment-15194662
 ] 

Tsz Wo Nicholas Sze commented on HADOOP-12909:
----------------------------------------------

[~xiaobingo], thanks for posting a patch.  Some comments:
- We should not add the new conf fs.client.in.asynchronous.mode.  Let's simply 
add a setAsynchronous somewhere.  It may be implemented by a ThreadLocal 
variable (similar to returnFuture).
- Let's rename isInAsynchronousMode to isAsynchronous and returnFuture to 
returnValue
- We don't need recvReponseExecutor for receiving responses.  We could 
implement a Future subclass so that get() will invoke getRpcResponse(call, 
connection) and then return the return value of the call.

> Change ipc.Client to support asynchronous calls
> -----------------------------------------------
>
>                 Key: HADOOP-12909
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12909
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: ipc
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Xiaobing Zhou
>         Attachments: HADOOP-12909-HDFS-9924.000.patch
>
>
> In ipc.Client, the underlying mechanism is already supporting asynchronous 
> calls -- the calls shares a connection, the call requests are sent using a 
> thread pool and the responses can be out of order.  Indeed, synchronous call 
> is implemented by invoking wait() in the caller thread in order to wait for 
> the server response.
> In this JIRA, we change ipc.Client to support asynchronous mode.  In 
> asynchronous mode, it return once the request has been sent out but not wait 
> for the response from the server.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to