HDFS-11993. Add log info when connect to datanode socket address failed. Contributed by chencan

(cherry picked from commit a9d3412b4c)
This commit is contained in:
Ravi Prakash 2017-06-26 13:24:27 -07:00
parent b59b96deee
commit ef491f4637
1 changed files with 3 additions and 2 deletions

View File

@ -674,8 +674,9 @@ public class DFSInputStream extends FSInputStream
fetchBlockAt(target); fetchBlockAt(target);
} else { } else {
connectFailedOnce = true; connectFailedOnce = true;
DFSClient.LOG.warn("Failed to connect to " + targetAddr + " for block" DFSClient.LOG.warn("Failed to connect to {} for block {}, " +
+ ", add to deadNodes and continue. " + ex, ex); "add to deadNodes and continue. ", targetAddr,
targetBlock.getBlock(), ex);
// Put chosen node into dead list, continue // Put chosen node into dead list, continue
addToDeadNodes(chosenNode); addToDeadNodes(chosenNode);
} }