hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r669586 - in /hadoop/core/trunk: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/ReplicationTargetChooser.java
Date Thu, 19 Jun 2008 17:35:50 GMT
Author: hairong
Date: Thu Jun 19 10:35:50 2008
New Revision: 669586

URL: http://svn.apache.org/viewvc?rev=669586&view=rev
Log:
Move the change log of HADOOP-3519 to release 0.18.0 section.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/ReplicationTargetChooser.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=669586&r1=669585&r2=669586&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Jun 19 10:35:50 2008
@@ -15,9 +15,6 @@
     HADOOP-3563.  Refactor the distributed upgrade code so that it is 
     easier to identify datanode and namenode related code. (dhruba)
 
-    HADOOP-3576. Fix NullPointerException when renaming a directory
-    to its subdirectory. (Tse Wo (Nicholas), SZE via hairong) 
-
 Release 0.18.0 - Unreleased
 
   INCOMPATIBLE CHANGES
@@ -674,6 +671,9 @@
     HADOOP-1979. Speed up fsck by adding a buffered stream. (Lohit
     Vijaya Renu via omalley)
 
+    HADOOP-3576. Fix NullPointerException when renaming a directory
+    to its subdirectory. (Tse Wo (Nicholas), SZE via hairong)
+
 Release 0.17.0 - 2008-05-18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/ReplicationTargetChooser.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/ReplicationTargetChooser.java?rev=669586&r1=669585&r2=669586&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/ReplicationTargetChooser.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/ReplicationTargetChooser.java Thu Jun
19 10:35:50 2008
@@ -449,10 +449,10 @@
         writer = nodes[0];
       }
       for(;index<nodes.length; index++) {
-        DatanodeDescriptor shortestNode = null;
-        int shortestDistance = Integer.MAX_VALUE;
+        DatanodeDescriptor shortestNode = nodes[index];
+        int shortestDistance = clusterMap.getDistance(writer, shortestNode);
         int shortestIndex = index;
-        for(int i=index; i<nodes.length; i++) {
+        for(int i=index+1; i<nodes.length; i++) {
           DatanodeDescriptor currentNode = nodes[i];
           int currentDistance = clusterMap.getDistance(writer, currentNode);
           if (shortestDistance>currentDistance) {



Mime
View raw message