-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11326/
-----------------------------------------------------------
(Updated Aug. 22, 2013, 8:03 a.m.)
Review request for hive and Navis Ryu.
Changes
-------
Changes per review feedback -
- HiveSessionHook : extend org.apache.hadoop.hive.ql.hooks.Hook?
Done
- HiveSessionHookContext.getSessionHandle() : would it be better to return
SessionHandle rather than SessionHandle.toString()?
I am trying to minimize exposing internals to the hook. The main use case is
for auditing, user filter etc. where a string representation of session handle
is sufficient. If you think SessionHandle is more useful, I can put that change
in
- SessionManager : how about extract method Driver.getHooks() into some utility
class(JavaUtil?) and use that?
Done
Bugs: HIVE-4588
https://issues.apache.org/jira/browse/HIVE-4588
Repository: hive-git
Description
-------
Support session level hooks for HiveServer2
- New config parameter to define the hook
- New hook context interface to pass the serssion user and config to the hook
implementation
- Session manager executes the configured hooks when a new session starts
Diffs
-----
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 0b4dad9
ql/src/java/org/apache/hadoop/hive/ql/Driver.java 3312b3b
ql/src/java/org/apache/hadoop/hive/ql/hooks/HookUtils.java PRE-CREATION
service/src/java/org/apache/hive/service/cli/session/HiveSessionHook.java
PRE-CREATION
service/src/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java
PRE-CREATION
service/src/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java
PRE-CREATION
service/src/java/org/apache/hive/service/cli/session/SessionManager.java
3bb6807
service/src/test/org/apache/hive/service/cli/session/TestSessionHooks.java
PRE-CREATION
Diff: https://reviews.apache.org/r/11326/diff/
Testing
-------
Added new test for session hooks
Thanks,
Prasad Mujumdar