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

Tsz Wo Nicholas Sze commented on HDFS-8204:
-------------------------------------------

> ... may causes 2 replicas ends in same node after running balance.

Indeed, it won't happen.  The target datanode will reject to receive the 
replica since it already has it.  So this is a bug only making the scheduling 
inefficient but won't cause 2 replicas moved to the same node.

Try your new test without the Dispatcher change.  It still passes and you will 
find ReplicaAlreadyExistsException in the log.

> Mover/Balancer should not schedule two replicas to the same DN
> --------------------------------------------------------------
>
>                 Key: HDFS-8204
>                 URL: https://issues.apache.org/jira/browse/HDFS-8204
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: balancer & mover
>            Reporter: Walter Su
>            Assignee: Walter Su
>         Attachments: HDFS-8204.001.patch, HDFS-8204.002.patch
>
>
> Balancer moves blocks between Datanode(Ver. <2.6 ).
> Balancer moves blocks between StorageGroups ( introduced by HDFS-6584) , in 
> the new version(Ver. >=2.6) .
> function
> {code}
> class DBlock extends Locations<StorageGroup>
> DBlock.isLocatedOn(StorageGroup loc)
> {code}
> is flawed, may causes 2 replicas ends in same node after running balance.
> For example:
> We have 2 nodes. Each node has two storages.
> We have (DN0, SSD), (DN0, DISK), (DN1, SSD), (DN1, DISK).
> We have a block with ONE_SSD storage policy.
> The block has 2 replicas. They are in (DN0,SSD) and (DN1,DISK).
> Replica in (DN0,SSD) should not be moved to (DN1,SSD) after running Balancer.
> Otherwise DN1 has 2 replicas.



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

Reply via email to