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

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

> ... The benefit of TestAsyncIPC extending TestIPC is to reuse most of IPC 
> test logic and make them working correctly for both cases of sync and async. 
> ...

As mentioned previously, TestAsyncIPC is not really testing asynchronous calls. 
 It is testing synchronous calls in asynchronous mode (by immediately calling 
Future.get() after each async call).  Should we reuse the logic in TestIPC, 
which is designed for testing synchronous calls?  In other words, are the 
current tests in TestAsyncIPC really relevant to the new asynchronous call 
feature?

BTW, for reusing the test logic, we may change the private methods/classes in 
TestIPC to package private and change them to static so that TestAsyncIPC can 
use them.  When TestAsyncIPC extends TestIPC, it is very hard to understand how 
does TestAsyncIPC work.

I do suggest we focus on testing asynchronous calls but not synchronous calls 
in asynchronous mode.  We may drop the the current tests in TestAsyncIPC 
instead of spending time on fixing them.

> 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, 
> HADOOP-12909-HDFS-9924.001.patch, HADOOP-12909-HDFS-9924.002.patch, 
> HADOOP-12909-HDFS-9924.003.patch, HADOOP-12909-HDFS-9924.004.patch, 
> HADOOP-12909-HDFS-9924.005.patch, HADOOP-12909-HDFS-9924.006.patch, 
> HADOOP-12909-HDFS-9924.007.patch, HADOOP-12909-HDFS-9924.008.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