[
https://issues.apache.org/jira/browse/HIVE-5924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13844130#comment-13844130
]
Jaideep Dhok commented on HIVE-5924:
------------------------------------
I am ready to put in a patch, but before that I wanted to present the approach
so that I could get some feedback -
The changes are as follows -
# New conf setting for location of query logs (queryLogDir), and a flag to
indicate if log redirection should be enabled, the flag will be default by
false.
# For each session there will be a directory under queryLogDir with name =
session id. In the directory there will be a session.out and a session.err for
session level logs
# Similarly, for each operation in the session there will be a directory with
name = operation id under queryLogDir/sessionDir/ Each directory will further
contain an operationid.err and operationid.out
# Changed LogHelper in SessionState.java so that all streams can be set
externally. Similarly the getters can check if an instance stream (for out or
error) is set and return that instead of returning the System.out and
System.err streams. Only if the instance streams are not set, it will return
the System streams.
# Pass LogHelper objects created in the operation to Driver and further down to
Tasks, so that output of Tasks and child processes can be redirected back.
Currently this is done only for SQLOperation
# Query purger executor that periodically checks if the session has been closed
for sufficient duration, and delete log files.
> Save operation logs in per operation directories in HiveServer2
> ---------------------------------------------------------------
>
> Key: HIVE-5924
> URL: https://issues.apache.org/jira/browse/HIVE-5924
> Project: Hive
> Issue Type: Improvement
> Components: HiveServer2
> Reporter: Jaideep Dhok
> Assignee: Jaideep Dhok
>
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)