klcopp commented on a change in pull request #1693:
URL: https://github.com/apache/hive/pull/1693#discussion_r528829672
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
##########
@@ -590,6 +587,39 @@ public Object run() throws Exception {
return true;
}
+ private void failCompactionIfSetForTest() {
+ if(conf.getBoolVar(HiveConf.ConfVars.HIVE_IN_TEST) &&
conf.getBoolVar(HiveConf.ConfVars.HIVETESTMODEFAILCOMPACTION)) {
+ throw new
RuntimeException(HiveConf.ConfVars.HIVETESTMODEFAILCOMPACTION.name() + "=true");
+ }
+ }
+
+ private void runCompactionViaMrJob(CompactionInfo ci, Table t, Partition p,
StorageDescriptor sd,
+ ValidCompactorWriteIdList tblValidWriteIds, StringBuilder jobName,
AcidUtils.Directory dir, StatsUpdater su)
+ throws IOException, HiveException, InterruptedException {
+ final CompactorMR mr = new CompactorMR();
+ if (runJobAsSelf(ci.runAs)) {
+ mr.run(conf, jobName.toString(), t, p, sd, tblValidWriteIds, ci, su,
msc, dir);
+ } else {
+ UserGroupInformation ugi = UserGroupInformation.createProxyUser(ci.runAs,
+ UserGroupInformation.getLoginUser());
+ final Partition fp = p;
+ final CompactionInfo fci = ci;
+ ugi.doAs(new PrivilegedExceptionAction<Object>() {
Review comment:
Noted, will do! Thanks for taking a look at this!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]