Browse Source

HDFS-13357. Improve AclException message "Invalid ACL: only directories may have a default ACL.". Contributed by Gabor Bota.

Wei-Chiu Chuang 7 years ago
parent
commit
ad10cbd91b

+ 2 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/AclStorage.java

@@ -281,7 +281,8 @@ public final class AclStorage {
       // Only directories may have a default ACL.
       // Only directories may have a default ACL.
       if (!defaultEntries.isEmpty() && !inode.isDirectory()) {
       if (!defaultEntries.isEmpty() && !inode.isDirectory()) {
         throw new AclException(
         throw new AclException(
-          "Invalid ACL: only directories may have a default ACL.");
+          "Invalid ACL: only directories may have a default ACL. "
+            + "Path: " + inode.getFullPathName());
       }
       }
 
 
       // Attach entries to the feature.
       // Attach entries to the feature.