Browse Source

HADOOP-1224. Fix to the prior fix. Contributed by Enis Soztutar.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@535992 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 years ago
parent
commit
04d7dc6ed8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/java/org/apache/hadoop/dfs/FSNamesystem.java

+ 1 - 1
src/java/org/apache/hadoop/dfs/FSNamesystem.java

@@ -2859,7 +2859,7 @@ class FSNamesystem implements FSConstants {
       index = r.nextInt(size);
       for(int i=0; i<size; i++) {
         DatanodeDescriptor d = getDatanodeByIndex(index);
-        if (d != null && !d.isDecommissioned() && isDatanodeDead(d) &&
+        if (d != null && !d.isDecommissioned() && !isDatanodeDead(d) &&
             !d.isDecommissionInProgress()) {
           return d.getHost() + ":" + d.getInfoPort();
         }