浏览代码

HDFS-7401. Add block info to DFSInputStream' WARN message when it adds node to deadNodes (Contributed by Arshad Mohammad)

Vinayakumar B 10 年之前
父节点
当前提交
b75df697e0

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -819,6 +819,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-8407. hdfsListDirectory must set errno to 0 on success (Masatake
     HDFS-8407. hdfsListDirectory must set errno to 0 on success (Masatake
     Iwasaki via Colin P. McCabe)
     Iwasaki via Colin P. McCabe)
 
 
+    HDFS-7401. Add block info to DFSInputStream' WARN message when it adds
+    node to deadNodes (Arshad Mohammad via vinayakumarb)
+
 Release 2.7.1 - UNRELEASED
 Release 2.7.1 - UNRELEASED
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java

@@ -631,8 +631,8 @@ implements ByteBufferReadable, CanSetDropBehind, CanSetReadahead,
           fetchBlockAt(target);
           fetchBlockAt(target);
         } else {
         } else {
           connectFailedOnce = true;
           connectFailedOnce = true;
-          DFSClient.LOG.warn("Failed to connect to " + targetAddr + " for block"
-            + ", add to deadNodes and continue. " + ex, ex);
+          DFSClient.LOG.warn("Failed to connect to " + targetAddr + " for block "
+            +targetBlock.getBlock()+ ", add to deadNodes and continue. " + ex, ex);
           // Put chosen node into dead list, continue
           // Put chosen node into dead list, continue
           addToDeadNodes(chosenNode);
           addToDeadNodes(chosenNode);
         }
         }