Review Board 1.7.22


HIVE-4669. Make username available to semantic analyzer hooks

Review Request #11661 - Created June 6, 2013 and updated

Shreepadma Venugopalan
trunk
HIVE-4669
Reviewers
hive
ashutoshc, navis
hive-git
Makes user name available to the semantic analyzer hooks.

 
ql/src/java/org/apache/hadoop/hive/ql/Driver.java
Revision a5a867a New Change
[20] 424 lines
[+20] [+] public int compile(String command, boolean resetTaskIds) {
425

    
   
425

   
426
      // Do semantic analysis and plan generation
426
      // Do semantic analysis and plan generation
427
      if (saHooks != null) {
427
      if (saHooks != null) {
428
        HiveSemanticAnalyzerHookContext hookCtx = new HiveSemanticAnalyzerHookContextImpl();
428
        HiveSemanticAnalyzerHookContext hookCtx = new HiveSemanticAnalyzerHookContextImpl();
429
        hookCtx.setConf(conf);
429
        hookCtx.setConf(conf);

    
   
430
        hookCtx.setUserName(userName);
430
        for (AbstractSemanticAnalyzerHook hook : saHooks) {
431
        for (AbstractSemanticAnalyzerHook hook : saHooks) {
431
          tree = hook.preAnalyze(hookCtx, tree);
432
          tree = hook.preAnalyze(hookCtx, tree);
432
        }
433
        }
433
        sem.analyze(tree, ctx);
434
        sem.analyze(tree, ctx);
434
        hookCtx.update(sem);
435
        hookCtx.update(sem);
[+20] [20] 1085 lines
ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContext.java
Revision ae371f3 New Change
 
ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContextImpl.java
Revision 9c3377e New Change
 
  1. ql/src/java/org/apache/hadoop/hive/ql/Driver.java: Loading...
  2. ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContext.java: Loading...
  3. ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContextImpl.java: Loading...