From 26cf988c3ae4fc7f0efa4d25075853baa6e91181 Mon Sep 17 00:00:00 2001 From: Brahma Reddy Battula Date: Thu, 27 Oct 2016 19:46:41 +0530 Subject: [PATCH] HADOOP-13201. Print the directory paths when ViewFs denies the rename operation on internal dirs. Contributed by Tianyin Xiu (cherry picked from commit 0c837db8a874079dd5db83a7eef9c4d2b9d0e9ff) --- .../src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java index 3beda536d88..6195540f3e1 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java @@ -472,14 +472,16 @@ public class ViewFs extends AbstractFileSystem { if (resSrc.isInternalDir()) { 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 resDst = fsState.resolve(getUriPath(dst), false); if (resDst.isInternalDir()) { 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"); } /**