Search in sources :

Example 1 with MetricsQueryLifeTimeHook

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;
}
Also used : ArrayList(java.util.ArrayList) QueryLifeTimeHook(org.apache.hadoop.hive.ql.hooks.QueryLifeTimeHook) MetricsQueryLifeTimeHook(org.apache.hadoop.hive.ql.hooks.MetricsQueryLifeTimeHook) MetricsQueryLifeTimeHook(org.apache.hadoop.hive.ql.hooks.MetricsQueryLifeTimeHook)

Aggregations

ArrayList (java.util.ArrayList)1 MetricsQueryLifeTimeHook (org.apache.hadoop.hive.ql.hooks.MetricsQueryLifeTimeHook)1 QueryLifeTimeHook (org.apache.hadoop.hive.ql.hooks.QueryLifeTimeHook)1