HDFS-10729. Improve log message for edit loading failures caused by FS limit checks. Contributed by Wei-Chiu Chuang.
(cherry picked from commit 01721dd88e
)
This commit is contained in:
parent
80bb9ffb67
commit
ce902fc80a
|
@ -40,6 +40,7 @@ import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
|
||||||
import org.apache.hadoop.hdfs.protocol.EncryptionZone;
|
import org.apache.hadoop.hdfs.protocol.EncryptionZone;
|
||||||
import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
|
import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
|
||||||
import org.apache.hadoop.hdfs.protocol.HdfsConstants;
|
import org.apache.hadoop.hdfs.protocol.HdfsConstants;
|
||||||
|
import org.apache.hadoop.hdfs.protocol.FSLimitException;
|
||||||
import org.apache.hadoop.hdfs.protocol.HdfsFileStatus;
|
import org.apache.hadoop.hdfs.protocol.HdfsFileStatus;
|
||||||
import org.apache.hadoop.hdfs.protocol.LocatedBlock;
|
import org.apache.hadoop.hdfs.protocol.LocatedBlock;
|
||||||
import org.apache.hadoop.hdfs.protocol.QuotaExceededException;
|
import org.apache.hadoop.hdfs.protocol.QuotaExceededException;
|
||||||
|
@ -507,10 +508,13 @@ class FSDirWriteFileOp {
|
||||||
return newNode;
|
return newNode;
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if(NameNode.stateChangeLog.isDebugEnabled()) {
|
NameNode.stateChangeLog.warn(
|
||||||
NameNode.stateChangeLog.debug(
|
"DIR* FSDirectory.unprotectedAddFile: exception when add " + existing
|
||||||
"DIR* FSDirectory.unprotectedAddFile: exception when add "
|
.getPath() + " to the file system", e);
|
||||||
+ 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;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue