[ https://issues.apache.org/jira/browse/HDFS-13248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16391560#comment-16391560 ]
Íñigo Goiri commented on HDFS-13248: ------------------------------------ I've tried to follow the logic in {{NamenodeRpcServer}} and it doesn't look like it uses the RPC address but the {{clientName}} parameter. {{NamenodeRpcServer#addBlock}} goes to {{FSNamesystem#getAdditionalBlock}} which calls {{FSDirWriteFileOp#chooseTargetForNewBlock}}. Inside {{chooseTargetForNewBlock}}, we call {{DatanodeManager#getDatanodeByHost()}} with a parameter called {{clientMachine}} which seems to come from {{FSDirWriteFileOp#validateAddBlock()}}: {code} clientMachine = pendingFile.getFileUnderConstructionFeature().getClientMachine(); {code} I'm not 100% sure but I think this value is the parameter {{clientName}} which we initially pass to {{RouterRpcServer#addBlock}}. > 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 > > 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 namennode 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