diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 40d83227db0..02db9ac08b0 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -233,6 +233,10 @@ Release 2.0.0 - UNRELEASED HADOOP-8270. hadoop-daemon.sh stop action should return 0 for an already stopped service. (Roman Shaposhnik via eli) + HADOOP-8144. pseudoSortByDistance in NetworkTopology doesn't work + properly if no local node and first node is local rack node. + (Junping Du) + BREAKDOWN OF HADOOP-7454 SUBTASKS HADOOP-7455. HA: Introduce HA Service Protocol Interface. (suresh) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java index 67fddd7e583..da8fab2956c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java @@ -662,8 +662,8 @@ public class NetworkTopology { */ public void pseudoSortByDistance( Node reader, Node[] nodes ) { int tempIndex = 0; + int localRackNode = -1; if (reader != null ) { - int localRackNode = -1; //scan the array to find the local node & local rack node for(int i=0; i