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

Íñigo Goiri commented on HDFS-13248:
------------------------------------

Thanks [~wuweiwei], I went through the code and got the 
{{Server#getRemoteAddress()}}; I think I have a better picture now.
In my opinion, the options and the drawbacks are the following:
# Change {{ClientProtocol}} to include the client machine
** I wouldn't go for this as it would imply lots of changes
# Reuse the {{clientName}} parameter and encode something there
** We would need to modify the Namenode to understand this change and wire the 
clientName all around
** A problem is that {{getBlockLocaitons()}} doesn't have such parameter
# Extend the connection from the Router to the Namenode
** A potential one would be to use the {{UserGroupInformation}} and add the 
source IP there
** We would need to just change {{NameNodeRpcServer#getClientMachine()}} in the 
NN side
** We could use some other field in the connection but we would need to extend 
the protocol for that

The simplest seems to be #3 but it might be a little hacky.
In any case, we would need to sync with a lot of people here.
I'll post a proposal and we can start from there.

> RBF: namenode need to choose block location for the client
> ----------------------------------------------------------
>
>                 Key: HDFS-13248
>                 URL: https://issues.apache.org/jira/browse/HDFS-13248
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Weiwei Wu
>            Priority: Major
>         Attachments: clientMachine-call-path.jpeg, debug-info-1.jpeg, 
> debug-info-2.jpeg
>
>
> When execute a put operation via router, the NameNode will choose block 
> location for the router, not for the real client. This will affect the file's 
> locality.
> I think on both NameNode and Router, we should add a new addBlock method, or 
> add a parameter for the current addBlock method, to pass the real client 
> information.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to