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

stack commented on HDFS-2576:
-----------------------------

Do you think this could cause us issue Devaraj:

{code}
+        favoredNodeInfos[i] = new DatanodeInfo(new DatanodeID(
+            favoredNodes[i].getAddress().getHostAddress() + ":" +
+            favoredNodes[i].getPort()));
{code}

Here we are doing resolve from the client's POV.  It might come up w/ a 
different hostname than that which the NN has for the favored node (vagaries of 
the local resolve setup).  Anything we can do to make it so we for sure have 
same name for the favored node as NN has?

nit: presize w/ replication count?

+      List<DatanodeDescriptor> results = new ArrayList<DatanodeDescriptor>();

I am unclear on the comment below:

{code}
+        // Choose a single node which is local to favoredNode.
+        DatanodeDescriptor[] locations = replicator.chooseTarget(1,
+            favoredNode, new ArrayList<DatanodeDescriptor>(),
+            excludedNodes, blockSize);
{code}

Does it mean local to the supplied favoredNode?  If so, why not "Choose the 
favored node".  Or is it saying choose as one of the replicas, the node that is 
making the request; i.e. enforcing a replica local to the location the 
dfsclient is making the request from?  If the latter, I have further comment 
but will hold for clarification (and looking at code, it is the former it 
seems).

Patch looks great DD.

                
> Namenode should have a favored nodes hint to enable clients to have control 
> over block placement.
> -------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-2576
>                 URL: https://issues.apache.org/jira/browse/HDFS-2576
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>            Reporter: Pritam Damania
>         Attachments: hdfs-2576-1.txt
>
>
> Sometimes Clients like HBase are required to dynamically compute the 
> datanodes it wishes to place the blocks for a file for higher level of 
> locality. For this purpose there is a need of a way to give the Namenode a 
> hint in terms of a favoredNodes parameter about the locations where the 
> client wants to put each block. The proposed solution is a favored nodes 
> parameter in the addBlock() method and in the create() file method to enable 
> the clients to give the hints to the NameNode about the locations of each 
> replica of the block. Note that this would be just a hint and finally the 
> NameNode would look at disk usage, datanode load etc. and decide whether it 
> can respect the hints or not.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to