diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 383bc284a7..8c7c19e81a 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -349,6 +349,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 67fddd7e58..da8fab2956 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 @@ static private void swap(Node[] nodes, int i, int j) { */ 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