well,i guess i got the answer.First hadoop use tcp,so will not occur 
situations like reaultBody_by_threadB,callId_by_threadB;Second,the server has 
been synchronied on the response queue when the responder send response 
messages ,and for one call each time.Since the clients use the same server,so 
the messages will not be reordered.




heyongqiang
2008-05-22



发件人: heyongqiang
发送时间: 2008-05-22 13:30:10
收件人: core-user
抄送: 
主题: Confuse about the Client.Connection

hi,all
I took a look at the source code of org.apache.hadoop.ipc.Client ,and i wonder 
if there are two client thread  invoke the getConnection() specifing the same 
arguments,then they will get a same Connection object,how could they 
distinguish the results from each other?
I noticed the results streamed back from the server is collected by the 
Connection's thread,not the callers' threads,
and the Connection's thread expects reaults :callId_XX,reaultBody_XX.
Is there a situation in which Connection's result thread collects 
callId_by_threadA,reaultBody_by_threadB,callId_by_threadB,resultBody_by_threadA?I
 think this situation is kind of reasonable,how does the current code handle 
this?







        heyongqiang
[EMAIL PROTECTED]
        2008-05-22

Reply via email to