This is an automated email from the ASF dual-hosted git repository.
dkuzmenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 89005659d1d HIVE-27850: Iceberg: Addendum 2: Set runAs user in
CompactionInfo (Dmitriy Fingerman, reviewed by Denys Kuzmenko)
89005659d1d is described below
commit 89005659d1d8e167208ba4f9f9aaa2de7703229d
Author: Dmitriy Fingerman <[email protected]>
AuthorDate: Tue Feb 27 08:45:10 2024 -0500
HIVE-27850: Iceberg: Addendum 2: Set runAs user in CompactionInfo (Dmitriy
Fingerman, reviewed by Denys Kuzmenko)
Closes #5100
---
.../apache/iceberg/mr/hive/compaction/IcebergCompactionService.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/compaction/IcebergCompactionService.java
b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/compaction/IcebergCompactionService.java
index 5c985a55e57..7251f6965bc 100644
---
a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/compaction/IcebergCompactionService.java
+++
b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/compaction/IcebergCompactionService.java
@@ -19,6 +19,7 @@
package org.apache.iceberg.mr.hive.compaction;
import org.apache.hadoop.hive.metastore.api.Table;
+import org.apache.hadoop.hive.metastore.txn.TxnUtils;
import org.apache.hadoop.hive.metastore.txn.entities.CompactionInfo;
import org.apache.hadoop.hive.ql.txn.compactor.CompactorContext;
import org.apache.hadoop.hive.ql.txn.compactor.CompactorPipeline;
@@ -48,6 +49,10 @@ public class IcebergCompactionService extends
CompactionService {
}
CompactorUtil.checkInterrupt(CLASS_NAME);
+ if (ci.runAs == null) {
+ ci.runAs = TxnUtils.findUserToRunAs(table.getSd().getLocation(), table,
conf);
+ }
+
try {
CompactorPipeline compactorPipeline =
compactorFactory.getCompactorPipeline(table, conf, ci, msc);
computeStats = collectGenericStats;