HIVE-20066 : hive.load.data.owner is compared to full principal (Daniel Voros via Zoltan Haindrich)
Signed-off-by: Ashutosh Chauhan <hashut...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/5e2a530c Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/5e2a530c Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/5e2a530c Branch: refs/heads/master-txnstats Commit: 5e2a530cc857c36dc97de6f5bec4003c569d00bd Parents: 3b6d4e2 Author: Daniel Voros <daniel.vo...@gmail.com> Authored: Wed Jul 4 12:15:34 2018 -0700 Committer: Ashutosh Chauhan <hashut...@apache.org> Committed: Wed Jul 4 12:15:34 2018 -0700 ---------------------------------------------------------------------- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/5e2a530c/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 c2ffe02..cd62d49 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 @@ -3879,7 +3879,7 @@ private void constructOneLBLocationMap(FileStatus fSta, try { srcs = srcFs.getFileStatus(srcf); - String runningUser = UserGroupInformation.getLoginUser().getUserName(); + String runningUser = UserGroupInformation.getLoginUser().getShortUserName(); boolean isOwned = FileUtils.isOwnerOfFileHierarchy(srcFs, srcs, configuredOwner, false); if (configuredOwner.equals(runningUser)) { // Check if owner has write permission, else it will have to copy