hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10964) Small fix for NetworkTopologyWithNodeGroup#sortByDistance
Date Fri, 15 Aug 2014 07:49:19 GMT

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

Hudson commented on HADOOP-10964:
---------------------------------

FAILURE: Integrated in Hadoop-trunk-Commit #6076 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/6076/])
HADOOP-10964. Small fix for NetworkTopologyWithNodeGroup#sortByDistance. Contributed by Yi
Liu. (wang: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1618103)
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopologyWithNodeGroup.java


> Small fix for NetworkTopologyWithNodeGroup#sortByDistance
> ---------------------------------------------------------
>
>                 Key: HADOOP-10964
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10964
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>            Priority: Minor
>             Fix For: 2.6.0
>
>         Attachments: HADOOP-10964.001.patch
>
>
> {{nodes.length}} should be {{activeLen}}.
> {code}
>   @Override
>   public void sortByDistance(Node reader, Node[] nodes, int activeLen,
>       long seed, boolean randomizeBlockLocationsPerBlock) {
>     // If reader is not a datanode (not in NetworkTopology tree), we need to
>     // replace this reader with a sibling leaf node in tree.
>     if (reader != null && !this.contains(reader)) {
>       Node nodeGroup = getNode(reader.getNetworkLocation());
>       if (nodeGroup != null && nodeGroup instanceof InnerNode) {
>         InnerNode parentNode = (InnerNode) nodeGroup;
>         // replace reader with the first children of its parent in tree
>         reader = parentNode.getLeaf(0, null);
>       } else {
>         return;
>       }
>     }
>     super.sortByDistance(reader, nodes, nodes.length, seed,
>         randomizeBlockLocationsPerBlock);
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message