You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ek...@apache.org on 2017/12/22 19:39:32 UTC

hive git commit: HIVE-18293 - Hive is failing to compact tables contained within a folder that is not owned by identity running HiveMetaStore (Johannes Alberti via Eugene Koifman)

Repository: hive
Updated Branches:
  refs/heads/master 3aaddb2d2 -> e2e1139db


HIVE-18293 - Hive is failing to compact tables contained within a folder that is not owned by identity running HiveMetaStore (Johannes Alberti via Eugene Koifman)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e2e1139d
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e2e1139d
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e2e1139d

Branch: refs/heads/master
Commit: e2e1139db00eb05080a51098ef9cf7047986c4b8
Parents: 3aaddb2
Author: Eugene Koifman <ek...@hortonworks.com>
Authored: Fri Dec 22 11:39:22 2017 -0800
Committer: Eugene Koifman <ek...@hortonworks.com>
Committed: Fri Dec 22 11:39:22 2017 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e2e1139d/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java
index 029f882..ade7726 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorThread.java
@@ -180,7 +180,9 @@ abstract class CompactorThread extends Thread implements MetaStoreThread {
       ugi.doAs(new PrivilegedExceptionAction<Object>() {
         @Override
         public Object run() throws Exception {
-          FileStatus stat = fs.getFileStatus(p);
+          // need to use a new filesystem object here to have the correct ugi
+          FileSystem proxyFs = p.getFileSystem(conf);
+          FileStatus stat = proxyFs.getFileStatus(p);
           wrapper.add(stat.getOwner());
           return null;
         }