Repository: hive Updated Branches: refs/heads/master 999f0607b -> a25be60e9
HIVE-13810: insert overwrite select from some table fails throwing org.apache.hadoop.security.AccessControlException (Hari Subramaniyan, reviewed by Ashutosh Chauhan) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/a25be60e Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/a25be60e Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/a25be60e Branch: refs/heads/master Commit: a25be60e9f0abfdf7b35536359b43433d5c493fc Parents: 999f060 Author: Hari Subramaniyan <harisan...@apache.org> Authored: Mon May 23 11:06:26 2016 -0700 Committer: Hari Subramaniyan <harisan...@apache.org> Committed: Mon May 23 11:06:26 2016 -0700 ---------------------------------------------------------------------- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java | 10 ++++++++++ 1 file changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/a25be60e/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java index 3fa1233..d9f58f2 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -2860,6 +2860,16 @@ private void constructOneLBLocationMap(FileStatus fSta, if (destIsSubDir) { FileStatus[] srcs = destFs.listStatus(srcf, FileUtils.HIDDEN_FILES_PATH_FILTER); + if (inheritPerms) { + try { + HdfsUtils.setFullFileStatus(conf, destStatus, destFs, destf, false); + } catch (IOException e) { + String msg = "Error setting permission of file " + destf; + LOG.error(msg); + throw new HiveException(msg, e); + } + } + List<Future<Void>> futures = new LinkedList<>(); final ExecutorService pool = Executors.newFixedThreadPool( conf.getIntVar(ConfVars.HIVE_MOVE_FILES_THREAD_COUNT),