HADOOP-13201. Print the directory paths when ViewFs denies the rename operation on internal dirs. Contributed by Tianyin Xiu

(cherry picked from commit 0c837db8a8)
This commit is contained in:
Brahma Reddy Battula 2016-10-27 19:46:41 +05:30
parent 5275d37495
commit 26cf988c3a
1 changed files with 5 additions and 3 deletions

View File

@ -472,14 +472,16 @@ public void renameInternal(final Path src, final Path dst,
if (resSrc.isInternalDir()) { if (resSrc.isInternalDir()) {
throw new AccessControlException( throw new AccessControlException(
"Cannot Rename within internal dirs of mount table: it is readOnly"); "Cannot Rename within internal dirs of mount table: src=" + src
+ " is readOnly");
} }
InodeTree.ResolveResult<AbstractFileSystem> resDst = InodeTree.ResolveResult<AbstractFileSystem> resDst =
fsState.resolve(getUriPath(dst), false); fsState.resolve(getUriPath(dst), false);
if (resDst.isInternalDir()) { if (resDst.isInternalDir()) {
throw new AccessControlException( throw new AccessControlException(
"Cannot Rename within internal dirs of mount table: it is readOnly"); "Cannot Rename within internal dirs of mount table: dest=" + dst
+ " is readOnly");
} }
/** /**