use of org.apache.hadoop.hive.ql.hooks.MetricsQueryLifeTimeHook in project hive by apache.
the class Driver method loadQueryHooks.
private List<QueryLifeTimeHook> loadQueryHooks() throws Exception {
List<QueryLifeTimeHook> hooks = new ArrayList<>();
if (conf.getBoolVar(ConfVars.HIVE_SERVER2_METRICS_ENABLED)) {
hooks.add(new MetricsQueryLifeTimeHook());
}
List<QueryLifeTimeHook> propertyDefinedHoooks = getHooks(ConfVars.HIVE_QUERY_LIFETIME_HOOKS, QueryLifeTimeHook.class);
if (propertyDefinedHoooks != null) {
Iterables.addAll(hooks, propertyDefinedHoooks);
}
return hooks;
}
Aggregations