use of org.apache.hadoop.hive.ql.txn.compactor.CompactorThread in project hive by apache.
the class TxnCommandsBaseForTests method runCompactorThread.
private static void runCompactorThread(HiveConf hiveConf, CompactorThreadType type) throws Exception {
AtomicBoolean stop = new AtomicBoolean(true);
CompactorThread t;
switch(type) {
case INITIATOR:
t = new Initiator();
break;
case WORKER:
t = new Worker();
break;
case CLEANER:
t = new Cleaner();
break;
default:
throw new IllegalArgumentException("Unknown type: " + type);
}
t.setThreadId((int) t.getId());
t.setConf(hiveConf);
t.init(stop);
t.run();
}
Aggregations