HDFS-10731. FSDirectory#verifyMaxDirItems does not log path name. Contributed by Wei-Chiu Chuang.

(cherry picked from commit 9019606b69)
(cherry picked from commit 20a8ff0a8d)
This commit is contained in:
Wei-Chiu Chuang 2016-08-11 14:43:48 -07:00
parent 9c1c48c0d4
commit 53f097a474
2 changed files with 5 additions and 3 deletions

View File

@ -87,8 +87,10 @@ public abstract class FSLimitException extends QuotaExceededException {
super(msg);
}
public MaxDirectoryItemsExceededException(long quota, long count) {
public MaxDirectoryItemsExceededException(String path, long quota,
long count) {
super(quota, count);
setPathName(path);
}
@Override

View File

@ -1004,9 +1004,9 @@ public class FSDirectory implements Closeable {
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