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

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

                Author: ASF GitHub Bot
            Created on: 29/Nov/22 20:30
            Start Date: 29/Nov/22 20:30
    Worklog Time Spent: 10m 
      Work Description: ayushtkn commented on code in PR #3813:
URL: https://github.com/apache/hive/pull/3813#discussion_r1035251314


##########
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java:
##########
@@ -250,7 +250,8 @@ 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:
   Thanx for the pointers, no specific reason for using space, if it can break 
parsers, better to avoid!!





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

    Worklog Id:     (was: 829881)
    Time Spent: 1h  (was: 50m)

> 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
>  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)

Reply via email to