HDFS-10729. Improve log message for edit loading failures caused by FS limit checks. Contributed by Wei-Chiu Chuang.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/01721dd8 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/01721dd8 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/01721dd8 Branch: refs/heads/HDFS-7240 Commit: 01721dd88ee532d20eda841254437da4dfd69db5 Parents: 20ae1fa Author: Kihwal Lee <[email protected]> Authored: Wed Aug 31 14:02:37 2016 -0500 Committer: Kihwal Lee <[email protected]> Committed: Wed Aug 31 14:02:37 2016 -0500 ---------------------------------------------------------------------- .../hadoop/hdfs/server/namenode/FSDirWriteFileOp.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/01721dd8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java index cb639b1..077f04f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirWriteFileOp.java @@ -40,6 +40,7 @@ import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy; import org.apache.hadoop.hdfs.protocol.EncryptionZone; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; +import org.apache.hadoop.hdfs.protocol.FSLimitException; import org.apache.hadoop.hdfs.protocol.HdfsFileStatus; import org.apache.hadoop.hdfs.protocol.LocatedBlock; import org.apache.hadoop.hdfs.protocol.QuotaExceededException; @@ -506,10 +507,13 @@ class FSDirWriteFileOp { return newNode; } } catch (IOException e) { - if(NameNode.stateChangeLog.isDebugEnabled()) { - NameNode.stateChangeLog.debug( - "DIR* FSDirectory.unprotectedAddFile: exception when add " - + existing.getPath() + " to the file system", e); + NameNode.stateChangeLog.warn( + "DIR* FSDirectory.unprotectedAddFile: exception when add " + existing + .getPath() + " to the file system", e); + if (e instanceof FSLimitException.MaxDirectoryItemsExceededException) { + NameNode.stateChangeLog.warn("Please increase " + + "dfs.namenode.fs-limits.max-directory-items and make it " + + "consistent across all NameNodes."); } } return null; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
