HDFS-10731. FSDirectory#verifyMaxDirItems does not log path name. Contributed by Wei-Chiu Chuang.
(cherry picked from commit 9019606b69bfb7019c8642b6cbcbb93645cc19e3)
This commit is contained in:
parent
6d53e096b2
commit
20a8ff0a8d
@ -87,8 +87,10 @@ protected MaxDirectoryItemsExceededException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
public MaxDirectoryItemsExceededException(long quota, long count) {
|
||||
public MaxDirectoryItemsExceededException(String path, long quota,
|
||||
long count) {
|
||||
super(quota, count);
|
||||
setPathName(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -991,9 +991,9 @@ void verifyMaxDirItems(INodeDirectory parent, String parentPath)
|
||||
final int count = parent.getChildrenList(CURRENT_STATE_ID).size();
|
||||
if (count >= maxDirItems) {
|
||||
final MaxDirectoryItemsExceededException e
|
||||
= new MaxDirectoryItemsExceededException(maxDirItems, count);
|
||||
= new MaxDirectoryItemsExceededException(parentPath, maxDirItems,
|
||||
count);
|
||||
if (namesystem.isImageLoaded()) {
|
||||
e.setPathName(parentPath);
|
||||
throw e;
|
||||
} else {
|
||||
// Do not throw if edits log is still being processed
|
||||
|
Loading…
x
Reference in New Issue
Block a user