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

Ming Ma commented on HDFS-8647:
-------------------------------

Thanks [~brahmareddy]! It looks great. Sorry, there is one question I didn't 
mentioned last time.

It seems the replica-to-be-deleted will be removed from the candidates in 
{{BlockPlacementPolicyDefault#chooseReplicasToDelete}}: 
{{candidates.remove(cur);}}. It will be removed again later in 
{{BlockManager#processChosenExcessReplica}}: {{nonExcess.remove(chosen);}}. 
Even though this doesn't cause any issue; it is better to keep the semantics of 
{{BlockPlacementPolicyDefault#chooseReplicasToDelete}} to not modify the 
candidates. What do you think? If you agree, after you update the patch and the 
patch passes jenkins, it is good to go.

In addition, I have used the local repo to evaluate how hard it is to 
cherry-pick to branch-2. It turns out I had to spend some time manually 
resolving the issues. I have taken care of that and you don't need to provide a 
version for branch-2. The patch passed HDFS unit tests in branch-2.

> Abstract BlockManager's rack policy into BlockPlacementPolicy
> -------------------------------------------------------------
>
>                 Key: HDFS-8647
>                 URL: https://issues.apache.org/jira/browse/HDFS-8647
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Ming Ma
>            Assignee: Brahma Reddy Battula
>         Attachments: HDFS-8647-001.patch, HDFS-8647-002.patch, 
> HDFS-8647-003.patch, HDFS-8647-004.patch, HDFS-8647-004.patch, 
> HDFS-8647-005.patch, HDFS-8647-006.patch, HDFS-8647-007.patch
>
>
> Sometimes we want to have namenode use alternative block placement policy 
> such as upgrade domains in HDFS-7541.
> BlockManager has built-in assumption about rack policy in functions such as 
> useDelHint, blockHasEnoughRacks. That means when we have new block placement 
> policy, we need to modify BlockManager to account for the new policy. Ideally 
> BlockManager should ask BlockPlacementPolicy object instead. That will allow 
> us to provide new BlockPlacementPolicy without changing BlockManager.



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

Reply via email to