hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1480) All replicas of a block can end up on the same rack when some datanodes are decommissioning.
Date Tue, 23 Aug 2011 22:13:30 GMT

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

Hudson commented on HDFS-1480:
------------------------------

Integrated in Hadoop-Mapreduce-trunk-Commit #770 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/770/])
    HDFS-1480. All replicas of a block can end up on the same rack when some datanodes are
decommissioning. Contributed by Todd Lipcon.

todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1160897
Files : 
* /hadoop/common/trunk/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
* /hadoop/common/trunk/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
* /hadoop/common/trunk/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
* /hadoop/common/trunk/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicy.java


> All replicas of a block can end up on the same rack when some datanodes are decommissioning.
> --------------------------------------------------------------------------------------------
>
>                 Key: HDFS-1480
>                 URL: https://issues.apache.org/jira/browse/HDFS-1480
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.20.2
>            Reporter: T Meyarivan
>            Assignee: Todd Lipcon
>             Fix For: 0.23.0
>
>         Attachments: hdfs-1480-test.txt, hdfs-1480.txt, hdfs-1480.txt, hdfs-1480.txt
>
>
> It appears that all replicas of a block can end up in the same rack. The likelihood of
such replicas seems to be directly related to decommissioning of nodes. 
> Post rolling OS upgrade (decommission 3-10% of nodes, re-install etc, add them back)
of a running cluster, all replicas of about 0.16% of blocks ended up in the same rack.
> Hadoop Namenode UI etc doesn't seem to know about such incorrectly replicated blocks.
"hadoop fsck .." does report that the blocks must be replicated on additional racks.
> Looking at ReplicationTargetChooser.java, following seem suspect:
> snippet-01:
> {code}
>     int maxNodesPerRack =
>       (totalNumOfReplicas-1)/clusterMap.getNumOfRacks()+2;
> {code}
> snippet-02:
> {code}
>       case 2:
>         if (clusterMap.isOnSameRack(results.get(0), results.get(1))) {
>           chooseRemoteRack(1, results.get(0), excludedNodes,
>                            blocksize, maxNodesPerRack, results);
>         } else if (newBlock){
>           chooseLocalRack(results.get(1), excludedNodes, blocksize,
>                           maxNodesPerRack, results);
>         } else {
>           chooseLocalRack(writer, excludedNodes, blocksize,
>                           maxNodesPerRack, results);
>         }
>         if (--numOfReplicas == 0) {
>           break;
>         }
> {code}
> snippet-03:
> {code}
>     do {
>       DatanodeDescriptor[] selectedNodes =
>         chooseRandom(1, nodes, excludedNodes);
>       if (selectedNodes.length == 0) {
>         throw new NotEnoughReplicasException(
>                                              "Not able to place enough replicas");
>       }
>       result = (DatanodeDescriptor)(selectedNodes[0]);
>     } while(!isGoodTarget(result, blocksize, maxNodesPerRack, results));
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message