public <T> List<T> getHooks(HookContext.HookType type, Class<T> clazz) {
    if (!type.getHookClass().isAssignableFrom(clazz)) {
      String message = "The arg class: " + clazz.getName() + " should be the same as, "
          + "or the subclass of " + type.getHookClass().getName()
          + ", as the type: " + type + " defined";
      logErrorMessage(message);
      throw new IllegalArgumentException(message);
    }
    loadHooksFromConf(type);
    return typeHooks.get(type).getHooks();
  }
Get all hooks corresponding to the specific hook type.
@param type The hook type
@param clazz The hook class of returning hooks
@param <T> The generic type of the hooks
@return List of hooks
ql/src/java/org/apache/hadoop/hive/ql/hooks/HiveHooks.java