Review Board 1.7.22


HIVE-4588: Support session level hooks for HiveServer2

Review Request #11326 - Created May 22, 2013 and updated

Prasad Mujumdar
trunk
HIVE-4588
Reviewers
hive
navis
hive-git
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
Added new test for session hooks
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
Revision 0b4dad9 New Change
[20] 746 lines
[+20] [+] public class HiveConf extends Configuration {
747
    HIVE_SERVER2_PLAIN_LDAP_BASEDN("hive.server2.authentication.ldap.baseDN", null),
747
    HIVE_SERVER2_PLAIN_LDAP_BASEDN("hive.server2.authentication.ldap.baseDN", null),
748
    HIVE_SERVER2_PLAIN_LDAP_DOMAIN("hive.server2.authentication.ldap.Domain", null),
748
    HIVE_SERVER2_PLAIN_LDAP_DOMAIN("hive.server2.authentication.ldap.Domain", null),
749
    HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS("hive.server2.custom.authentication.class", null),
749
    HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS("hive.server2.custom.authentication.class", null),
750
    HIVE_SERVER2_ENABLE_DOAS("hive.server2.enable.doAs", true),
750
    HIVE_SERVER2_ENABLE_DOAS("hive.server2.enable.doAs", true),
751
    HIVE_SERVER2_TABLE_TYPE_MAPPING("hive.server2.table.type.mapping", "HIVE"),
751
    HIVE_SERVER2_TABLE_TYPE_MAPPING("hive.server2.table.type.mapping", "HIVE"),

    
   
752
    HIVE_SERVER2_SESSION_HOOK("hive.server2.session.hook", ""),
752

    
   
753

   
753
    HIVE_CONF_RESTRICTED_LIST("hive.conf.restricted.list", null),
754
    HIVE_CONF_RESTRICTED_LIST("hive.conf.restricted.list", null),
754

    
   
755

   
755
    // If this is set all move tasks at the end of a multi-insert query will only begin once all
756
    // If this is set all move tasks at the end of a multi-insert query will only begin once all
756
    // outputs are ready
757
    // outputs are ready
[+20] [20] 505 lines
ql/src/java/org/apache/hadoop/hive/ql/Driver.java
Revision 3312b3b New Change
 
ql/src/java/org/apache/hadoop/hive/ql/hooks/HookUtils.java
New File
 
service/src/java/org/apache/hive/service/cli/session/HiveSessionHook.java
New File
 
service/src/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java
New File
 
service/src/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java
New File
 
service/src/java/org/apache/hive/service/cli/session/SessionManager.java
Revision 3bb6807 New Change
 
service/src/test/org/apache/hive/service/cli/session/TestSessionHooks.java
New File
 
  1. common/src/java/org/apache/hadoop/hive/conf/HiveConf.java: Loading...
  2. ql/src/java/org/apache/hadoop/hive/ql/Driver.java: Loading...
  3. ql/src/java/org/apache/hadoop/hive/ql/hooks/HookUtils.java: Loading...
  4. service/src/java/org/apache/hive/service/cli/session/HiveSessionHook.java: Loading...
  5. service/src/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java: Loading...
  6. service/src/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java: Loading...
  7. service/src/java/org/apache/hive/service/cli/session/SessionManager.java: Loading...
  8. service/src/test/org/apache/hive/service/cli/session/TestSessionHooks.java: Loading...