[ 
https://issues.apache.org/jira/browse/HIVE-12254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aihua Xu updated HIVE-12254:
----------------------------
    Status: Patch Available  (was: Open)

patch-3: in this patch, we are setting session_id when SessionState gets 
created and setting query_id when QueryState gets created so the following HDFS 
access gets audited with the right CallerContext. Additionally we are setting 
query context if the query is executed on a separate thread.

Here are some sample outputs from audit log.
{noformat}
2018-09-28 14:31:24,101 INFO FSNamesystem.audit: allowed=true   ugi=aihuaxu 
(auth:SIMPLE)       ip=/127.0.0.1   cmd=rename      
src=/tmp/hive/aihuaxu/8a29d2f3-a782-4f8b-949d-459f0263330b/hive_2018-09-28_14-31-00_304_218512707084907466-1/-mr-10000/.hive-staging_hive_2018-09-28_14-31-00_304_218512707084907466-1/_tmp.-ext-10001
  
dst=/tmp/hive/aihuaxu/8a29d2f3-a782-4f8b-949d-459f0263330b/hive_2018-09-28_14-31-00_304_218512707084907466-1/-mr-10000/.hive-staging_hive_2018-09-28_14-31-00_304_218512707084907466-1/_tmp.-ext-10001.moved
    perm=aihuaxu:supergroup:rwxr-xr-x       proto=rpc       
callerContext=hive_queryId_aihuaxu_20180928143057_46a6a295-38f6-454c-b1c9-eed5b466fdd1
2018-09-28 14:31:24,102 INFO FSNamesystem.audit: allowed=true   ugi=aihuaxu 
(auth:SIMPLE)       ip=/127.0.0.1   cmd=listStatus  
src=/tmp/hive/aihuaxu/8a29d2f3-a782-4f8b-949d-459f0263330b/hive_2018-09-28_14-31-00_304_218512707084907466-1/-mr-10000/.hive-staging_hive_2018-09-28_14-31-00_304_218512707084907466-1/_tmp.-ext-10001.moved
    dst=null        perm=null       proto=rpc       
callerContext=hive_queryId_aihuaxu_20180928143057_46a6a295-38f6-454c-b1c9-eed5b466fdd1
{noformat}

> Improve logging with yarn/hdfs
> ------------------------------
>
>                 Key: HIVE-12254
>                 URL: https://issues.apache.org/jira/browse/HIVE-12254
>             Project: Hive
>          Issue Type: Bug
>          Components: Shims
>    Affects Versions: 1.2.1
>            Reporter: Vikram Dixit K
>            Assignee: Aihua Xu
>            Priority: Major
>         Attachments: HIVE-12254.1.patch, HIVE-12254.2.patch, 
> HIVE-12254.3.patch
>
>
> In extension to HIVE-12249, adding info for Yarn/HDFS as well. Both 
> HIVE-12249 and HDFS-9184 are required (and upgraded in hive for the HDFS 
> issue) before this can be resolved.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to