Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-17048

Pass HiveOperation info to HiveSemanticAnalyzerHook through HiveSemanticAnalyzerHookContext

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.1
    • 2.1.2, 2.2.1, 2.3.1, 2.4.0, 3.0.0
    • Hooks
    • None

    Description

      Currently hive passes the following info to HiveSemanticAnalyzerHook through HiveSemanticAnalyzerHookContext (see https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/Driver.java#L553). But the operation type (HiveOperation) is also needed in some cases, e.g., when integrating with Sentry.

              hookCtx.setConf(conf);
              hookCtx.setUserName(userName);
              hookCtx.setIpAddress(SessionState.get().getUserIpAddress());
              hookCtx.setCommand(command);
      

      Attachments

        1. HIVE-17048.2.patch
          10 kB
          Aihua Xu
        2. HIVE-17048.1.patch
          3 kB
          Aihua Xu

        Activity

          People

            aihuaxu Aihua Xu
            aihuaxu Aihua Xu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: