From 983c1d39693dc47e6a00281db3b985898a3bbafb Mon Sep 17 00:00:00 2001 From: Vinayakumar B Date: Fri, 29 May 2015 16:36:19 +0530 Subject: [PATCH] HDFS-7401. Add block info to DFSInputStream' WARN message when it adds node to deadNodes (Contributed by Arshad Mohammad) (cherry picked from commit b75df697e0f101f86788ad23a338ab3545b8d702) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index d020009f323..6dcc48e0e65 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -482,6 +482,9 @@ Release 2.8.0 - UNRELEASED HDFS-8407. hdfsListDirectory must set errno to 0 on success (Masatake 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 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java index d1e0b9a5931..8a3f730952b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java @@ -631,8 +631,8 @@ implements ByteBufferReadable, CanSetDropBehind, CanSetReadahead, fetchBlockAt(target); } else { 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 addToDeadNodes(chosenNode); }