You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/12/01 14:31:00 UTC

[jira] [Work logged] (HIVE-26789) Add UserName in CallerContext for queries

     [ https://issues.apache.org/jira/browse/HIVE-26789?focusedWorklogId=830356&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-830356 ]

ASF GitHub Bot logged work on HIVE-26789:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Dec/22 14:30
            Start Date: 01/Dec/22 14:30
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on code in PR #3813:
URL: https://github.com/apache/hive/pull/3813#discussion_r1037177772


##########
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java:
##########
@@ -250,12 +250,13 @@ CommandProcessorResponse processLocalCmd(String cmd, CommandProcessor proc, CliS
         }
 
         // Set HDFS CallerContext to queryId and reset back to sessionId after the query is done
-        ShimLoader.getHadoopShims().setHadoopQueryContext(qp.getQueryState().getQueryId());
+        ShimLoader.getHadoopShims()
+            .setHadoopQueryContext(qp.getQueryState().getQueryId() + "_User:" + ss.getUserName());

Review Comment:
   can we extract "_User:" literal into a constant or have a pattern for String.format() ?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 830356)
    Time Spent: 1h 40m  (was: 1.5h)

> Add UserName in CallerContext for queries
> -----------------------------------------
>
>                 Key: HIVE-26789
>                 URL: https://issues.apache.org/jira/browse/HIVE-26789
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> HDFS Audit logs if impersonation is false, tracks only the Hive user in the audit log, Can pass the actual user as part of the CallerContext, so that can be logged as well for better tracking



--
This message was sent by Atlassian Jira
(v8.20.10#820010)