private void setAclsToTarget(FileStatus sourceStatus, Path sourcePath, Path destPath, HiveConf clonedConf)
      throws IOException {
    // Check if distCp options contains preserve ACL.
    AclStatus sourceAcls = sourcePath.getFileSystem(clonedConf).getAclStatus(sourcePath);
    if (sourceAcls != null && sourceAcls.getEntries().size() > 0) {
      destPath.getFileSystem(clonedConf).removeAcl(destPath);
      List<AclEntry> effectiveAclEntries =
          AclUtil.getAclFromPermAndEntries(sourceStatus.getPermission(), sourceAcls.getEntries());
      destPath.getFileSystem(clonedConf).setAcl(destPath, effectiveAclEntries);
    }
  }
DirCopyTask, mainly to be used to copy External table data.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/DirCopyTask.java