HDFS-12293. DataNode should log file name on disk error. Contributed by Ajay Kumar.

This commit is contained in:
Arpit Agarwal 2017-08-28 15:49:59 -07:00
parent 51881a863c
commit a1e3f84afe
2 changed files with 4 additions and 2 deletions

View File

@ -284,7 +284,8 @@ class BlockReceiver implements Closeable {
// check if there is a disk error
IOException cause = DatanodeUtil.getCauseIfDiskError(ioe);
DataNode.LOG.warn("IOException in BlockReceiver constructor"
DataNode.LOG
.warn("IOException in BlockReceiver constructor :" + ioe.getMessage()
+ (cause == null ? "" : ". Cause is "), cause);
if (cause != null) {
ioe = cause;

View File

@ -2554,7 +2554,8 @@ public class DataNode extends ReconfigurableBase
// disk check moved to FileIoProvider
IOException cause = DatanodeUtil.getCauseIfDiskError(ie);
if (cause != null) { // possible disk error
LOG.warn("IOException in DataTransfer#run(). Cause is ", cause);
LOG.warn("IOException in DataTransfer#run() "+ ie.getMessage() +". "
+ "Cause is ", cause);
}
} finally {
decrementXmitsInProgress();