Author: suresh
Date: Tue May 10 06:04:26 2011
New Revision: 1101322
URL: http://svn.apache.org/viewvc?rev=1101322&view=rev
Log:
HDFS-1906. Remove logging exception stack trace in client logs when one of the
datanode targets to read from is not reachable. Contributed by Suresh Srinivas.
Modified:
hadoop/hdfs/trunk/CHANGES.txt
hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/DFSInputStream.java
Modified: hadoop/hdfs/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1101322&r1=1101321&r2=1101322&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Tue May 10 06:04:26 2011
@@ -392,6 +392,9 @@ Trunk (unreleased changes)
HDFS-1865. Share LeaseRenewer among DFSClients so that there is only a
LeaseRenewer thread per namenode per user. (szetszwo)
+ HDFS-1906. Remove logging exception stack trace in client logs when one of
+ the datanode targets to read from is not reachable. (suresh)
+
OPTIMIZATIONS
HDFS-1458. Improve checkpoint performance by avoiding unnecessary image
Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/DFSInputStream.java
URL:
http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/DFSInputStream.java?rev=1101322&r1=1101321&r2=1101322&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/DFSInputStream.java
(original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/DFSInputStream.java Tue
May 10 06:04:26 2011
@@ -410,8 +410,11 @@ public class DFSInputStream extends FSIn
refetchToken--;
fetchBlockAt(target);
} else {
- DFSClient.LOG.info("Failed to connect to " + targetAddr
- + ", add to deadNodes and continue", ex);
+ DFSClient.LOG.warn("Failed to connect to " + targetAddr
+ + ", add to deadNodes and continue " + ex);
+ if (DFSClient.LOG.isDebugEnabled()) {
+ DFSClient.LOG.debug("Connection failure ", ex);
+ }
// Put chosen node into dead list, continue
addToDeadNodes(chosenNode);
}
@@ -653,9 +656,11 @@ public class DFSInputStream extends FSIn
fetchBlockAt(block.getStartOffset());
continue;
} else {
- DFSClient.LOG.warn("Failed to connect to " + targetAddr + " for file
" + src
- + " for block " + block.getBlock() + ":"
- + StringUtils.stringifyException(e));
+ DFSClient.LOG.warn("Failed to connect to " + targetAddr +
+ " for file " + src + " for block " + block.getBlock() + ":" + e);
+ if (DFSClient.LOG.isDebugEnabled()) {
+ DFSClient.LOG.debug("Connection failure ", e);
+ }
}
} finally {
IOUtils.closeStream(reader);