1
0
Переглянути джерело

Porting from 0.20-append - HDFS-1054. remove sleep before retry for allocating a block. Contributed by Todd Lipcon.



git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security@1164730 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 14 роки тому
батько
коміт
551f777433
2 змінених файлів з 4 додано та 8 видалено
  1. 3 0
      CHANGES.txt
  2. 1 8
      src/hdfs/org/apache/hadoop/hdfs/DFSClient.java

+ 3 - 0
CHANGES.txt

@@ -63,6 +63,9 @@ Release 0.20.205.0 - unreleased
     HDFS-988. Fix bug where savenameSpace can corrupt edits log.
     (Nicolas Spiegelberg via dhruba)
 
+    HDFS-1054. remove sleep before retry for allocating a block.
+    (Todd Lipcon via dhruba)
+
   IMPROVEMENTS
 
     MAPREDUCE-2187. Reporter sends progress during sort/merge. (Anupam Seth via

+ 1 - 8
src/hdfs/org/apache/hadoop/hdfs/DFSClient.java

@@ -3054,19 +3054,12 @@ public class DFSClient implements FSConstants, java.io.Closeable {
           namenode.abandonBlock(block, src, clientName);
 
           if (errorIndex < nodes.length) {
-            LOG.debug("Excluding datanode " + nodes[errorIndex]);
+            LOG.info("Excluding datanode " + nodes[errorIndex]);
             excludedNodes.add(nodes[errorIndex]);
           }
 
           // Connection failed.  Let's wait a little bit and retry
           retry = true;
-          try {
-            if (System.currentTimeMillis() - startTime > 5000) {
-              LOG.info("Waiting to find target node: " + nodes[0].getName());
-            }
-            Thread.sleep(6000);
-          } catch (InterruptedException iex) {
-          }
         }
       } while (retry && --count >= 0);