diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index f4526ff6d18..580629bcefd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1053,6 +1053,9 @@ Release 2.8.0 - UNRELEASED TestSWebHdfsFileContextMainOperations fail due to invalid HDFS path on Windows. (Chris Nauroth via wheat9) + HDFS-9076. Log full path instead of inodeId in DFSClient + #closeAllFilesBeingWritten() (Surendra Singh Lilhore via vinayakumarb) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index f1e8905555b..496b0794f93 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -589,8 +589,8 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory, out.close(); } } catch(IOException ie) { - LOG.error("Failed to " + (abort? "abort": "close") + - " inode " + inodeId, ie); + LOG.error("Failed to " + (abort ? "abort" : "close") + " file: " + + out.getSrc() + " with inode: " + inodeId, ie); } } } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java index 5cd40a53d43..546693650b3 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java @@ -907,6 +907,13 @@ public class DFSOutputStream extends FSOutputSummer return fileId; } + /** + * Return the source of stream. + */ + String getSrc() { + return src; + } + /** * Returns the data streamer object. */