Skip to content

Commit

Permalink
HIVE-27850: Iceberg: Addendum 2: Set runAs user in CompactionInfo (Dm…
Browse files Browse the repository at this point in the history
…itriy Fingerman, reviewed by Denys Kuzmenko)

Closes #5100
  • Loading branch information
difin authored Feb 27, 2024
1 parent 1881c96 commit 8900565
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -48,6 +49,10 @@ public Boolean compact(Table table, CompactionInfo ci) throws Exception {
}
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;
Expand Down

0 comments on commit 8900565

Please sign in to comment.