瀏覽代碼

HADOOP-1911. Fix an infinite loop in DFSClient when all replicas of a
block are bad.



git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@644993 13f79535-47bb-0310-9956-ffa450edef68

Christopher Douglas 17 年之前
父節點
當前提交
c03f9ca33f
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 3 0
      CHANGES.txt
  2. 1 1
      src/java/org/apache/hadoop/dfs/DFSClient.java

+ 3 - 0
CHANGES.txt

@@ -514,6 +514,9 @@ Trunk (unreleased changes)
     HADOOP-3178. Fix GridMix scripts for small and medium jobs
     to handle input paths differently. (Mukund Madhugiri via nigel)
 
+    HADOOP-1911. Fix an infinite loop in DFSClient when all replicas of a
+    block are bad (cdouglas)
+
 Release 0.16.3 - Unreleased
 
   BUG FIXES

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

@@ -1113,6 +1113,7 @@ class DFSClient implements FSConstants {
     private Block currentBlock = null;
     private long pos = 0;
     private long blockEnd = -1;
+    private int failures = 0;
 
     /* XXX Use of CocurrentHashMap is temp fix. Need to fix 
      * parallel accesses to DFSInputStream (through ptreads) properly */
@@ -1421,7 +1422,6 @@ class DFSClient implements FSConstants {
         
     private DNAddrPair chooseDataNode(LocatedBlock block)
       throws IOException {
-      int failures = 0;
       while (true) {
         DatanodeInfo[] nodes = block.getLocations();
         try {