Преглед изворни кода

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

(cherry picked from commit 0c837db8a874079dd5db83a7eef9c4d2b9d0e9ff)
Brahma Reddy Battula пре 8 година
родитељ
комит
616d634525

+ 4 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -74,6 +74,10 @@ Release 2.7.4 - UNRELEASED
     HADOOP-13236. truncate will fail when we use viewfilesystem.
     (Brahma Reddy Battula)
 
+    HADOOP-13201. Print the directory paths when ViewFs denies the rename
+    operation on internal dirs.
+    (Contributed by Tianyin Xiu via Brahma Reddy Battula)
+
 Release 2.7.3 - 2016-08-25
 
   INCOMPATIBLE CHANGES

+ 5 - 3
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java

@@ -471,14 +471,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<AbstractFileSystem> 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");
     }
     
     /**