use of org.apache.hadoop.hive.ql.stats.OperatorStatsReaderHook in project hive by apache.
the class ReOptimizePlugin method initialize.
@Override
public void initialize(Driver driver) {
coreDriver = driver;
coreDriver.getHookRunner().addOnFailureHook(new LocalHook());
statsReaderHook = new OperatorStatsReaderHook();
coreDriver.getHookRunner().addOnFailureHook(statsReaderHook);
coreDriver.getHookRunner().addPostHook(statsReaderHook);
// statsReaderHook.setCollectOnSuccess(true);
statsReaderHook.setCollectOnSuccess(driver.getConf().getBoolVar(ConfVars.HIVE_QUERY_REEXECUTION_ALWAYS_COLLECT_OPERATOR_STATS));
}
Aggregations