[
https://issues.apache.org/jira/browse/HADOOP-10964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14098447#comment-14098447
]
Hudson commented on HADOOP-10964:
---------------------------------
FAILURE: Integrated in Hadoop-Yarn-trunk #647 (See
[https://builds.apache.org/job/Hadoop-Yarn-trunk/647/])
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)