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

Zhe Zhang commented on HDFS-7891:
---------------------------------

Thanks for the patch Walter! The patch looks good overall. Please find my 
review below.

Logic:
# I think the current flow is functionally correct. But {{maxNodesPerRack}} no 
longer denotes the maximum nodes to be allocated per rack, making the code less 
readable. Right now {{chooseTargetInOrder}} treats {{maxNodesPerRack}} as the 
number of replicas to allocate to each rack _in the first round_.
# If we simply let {{getMaxNodesPerRack()}} return the ceiling of 
{{totalNumOfReplicas/numOfRacks}}, like {{(totalNumOfReplicas - 1) / numOfRacks 
+ 1}}, then do not override {{chooseTargetInOrder()}}, can we get the right 
distribution we want?

Nits:
# Override annotation missing in 
{{BlockPlacementPolicyRackFaultTolarent#chooseTargetInOrder}}
# Could remove the empty constructor of 
{{BlockPlacementPolicyRackFaultTolarent}}
# {{chooseOnce}| needs some Javadoc. 

[~szetszwo]: Since this is targeted for trunk now, it would be great if you can 
review the patch as well. Thanks!

> A block placement policy with best rack failure tolerance
> ---------------------------------------------------------
>
>                 Key: HDFS-7891
>                 URL: https://issues.apache.org/jira/browse/HDFS-7891
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: namenode
>            Reporter: Walter Su
>            Assignee: Walter Su
>            Priority: Minor
>         Attachments: HDFS-7891.005.dup.patch, HDFS-7891.005.patch
>
>
> a block placement policy tries its best to place replicas to most racks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to