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

zhengchenyu commented on HADOOP-16254:
--------------------------------------

I debug the code use HADOOP-16254.004.patch. But I found this code 
'result.setProxyAddress(proxyAddress);' in makeIpcConnectionContext was called 
randomly.

By review related rpc code, I found on connection will process more than one 
call to specific namenode, connection was cahed in connections, then reuse by 
ConnectionId. So if client visit nn1:port twice in little interval, 
writeConnectionContext will only called in first time. It means we only use the 
first IpcConnectionContextProto, so ingore proxyaddress. 

How to trigger this problem? Maybe this problem is not serious for a general 
hdfs client. But for router, both heartbeatservice and proxy client request 
will share same connection (means visit same namenode service). Sometimes, 
heartbeatservice will set IpcConnectionContextProto first, the proxy address 
will not passed to namenode.

 

> Add proxy address in IPC connection
> -----------------------------------
>
>                 Key: HADOOP-16254
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16254
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: ipc
>            Reporter: Xiaoqiao He
>            Assignee: Xiaoqiao He
>            Priority: Major
>         Attachments: HADOOP-16254.001.patch, HADOOP-16254.002.patch, 
> HADOOP-16254.004.patch
>
>
> In order to support data locality of RBF, we need to add new field about 
> client hostname in the RPC headers of Router protocol calls.
>  clientHostname represents hostname of client and forward by Router to 
> Namenode to support data locality friendly. See more [RBF Data Locality 
> Design|https://issues.apache.org/jira/secure/attachment/12965092/RBF%20Data%20Locality%20Design.pdf]
>  in HDFS-13248 and [maillist 
> vote|http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201904.mbox/%3CCAF3Ajax7hGxvowg4K_HVTZeDqC5H=3bfb7mv5sz5mgvadhv...@mail.gmail.com%3E].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to