[
https://issues.apache.org/jira/browse/HDFS-8204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14509608#comment-14509608
]
Tsz Wo Nicholas Sze commented on HDFS-8204:
-------------------------------------------
> Update: This issue is about "DN". HDFS-8147 is about "Storage". It's
> different.
I see. Then, please checking the same storage group is not good enough. It
should check also the node.
Some comments for the patch:
- The logic could be simplified as below.
{code}
final DatanodeInfo targetDatanode = target.getDatanodeInfo();
for (StorageGroup blockLocation : block.getLocations()) {
if (blockLocation.getDatanodeInfo().equals(targetDatanode)) {
return false;
}
}
{code}
- The following is not needed since isGoodBlockCandidate is already called via
source.addPendingMove(db, target).
{code}
+ if (!dispatcher.isGoodBlockCandidate(source, target, t, db)) {
+ continue;
+ }
{code}
- Could you add/modify a test?
> 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
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)