Skip to content

Commit

Permalink
remove HiveSeesionHook
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed May 3, 2016
1 parent 2e2a621 commit 9709675
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 57 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,6 @@ public SessionHandle openSession(TProtocolVersion protocol, String username, Str
if (isOperationLogEnabled) {
session.setOperationLogSessionDir(operationLogRootDir);
}
try {
executeSessionHooks(session);
} catch (Exception e) {
try {
session.close();
} catch (Throwable t) {
LOG.warn("Error closing session", t);
}
session = null;
throw new HiveSQLException("Failed to execute session hooks", e);
}
handleToSession.put(session.getSessionHandle(), session);
return session.getSessionHandle();
}
Expand Down Expand Up @@ -361,15 +350,6 @@ public static void clearProxyUserName() {
threadLocalProxyUserName.remove();
}

// execute session hooks
private void executeSessionHooks(HiveSession session) throws Exception {
List<HiveSessionHook> sessionHooks = HookUtils.getHooks(hiveConf,
HiveConf.ConfVars.HIVE_SERVER2_SESSION_HOOK, HiveSessionHook.class);
for (HiveSessionHook sessionHook : sessionHooks) {
sessionHook.run(new HiveSessionHookContextImpl(session));
}
}

public Future<?> submitBackgroundOperation(Runnable r) {
return backgroundOperationPool.submit(r);
}
Expand Down

0 comments on commit 9709675

Please sign in to comment.