diff --git a/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java b/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/H index 91d5e8f..cf2433b 100644 --- a/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java +++ b/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java @@ -678,13 +678,18 @@ public HdfsFileStatus getFullFileStatus(Configuration conf, FileSystem fs, Path file) throws IOException { FileStatus fileStatus = fs.getFileStatus(file); AclStatus aclStatus = null; - if (isExtendedAclEnabled(conf)) { + FsPermission targetPerm = fileStatus.getPermission(); + + if ( targetPerm.getAclBit()) { //Attempt extended Acl operations only if its enabled, but don't fail the operation regardless. try { - aclStatus = fs.getAclStatus(file); - } catch (Exception e) { - LOG.info("Skipping ACL inheritance: File system for path " + file + " " + - "does not support ACLs but dfs.namenode.acls.enabled is set to true: " + e, e); + aclStatus = fs.getAclStatus(file); + + } catch (UnsupportedOperationException e) { + + LOG.info("Skipping ACL inheritance: File system for path " + file + " " + + "does not support ACLs but dfs.namenode.acls.enabled is set to true: " + e, e); + } } return new Hadoop23FileStatus(fileStatus, aclStatus);