private void executeOnFailureHooks(
      HiveSemanticAnalyzerHookContext context, HiveOperation hiveOp, AuthorizationException e) {
    SentryOnFailureHookContext hookCtx =
        new SentryOnFailureHookContextImpl(
            context.getCommand(),
            context.getInputs(),
            context.getOutputs(),
            hiveOp,
            currDB,
            currTab,
            udfURI,
            null,
            context.getUserName(),
            context.getIpAddress(),
            e,
            context.getConf());
    String csHooks =
        authzConf.get(HiveAuthzConf.AuthzConfVars.AUTHZ_ONFAILURE_HOOKS.getVar(), "").trim();

    try {
      for (Hook aofh : getHooks(csHooks)) {
        ((SentryOnFailureHook) aofh).run(hookCtx);
      }
    } catch (Exception ex) {
      LOG.error("Error executing hook:", ex);
    }
  }
 public static void runFailureHook(SentryOnFailureHookContext hookContext, String csHooks) {
   try {
     for (Hook aofh : getHooks(csHooks)) {
       ((SentryOnFailureHook) aofh).run(hookContext);
     }
   } catch (Exception ex) {
     LOG.error("Error executing hook:", ex);
   }
 }