[
https://issues.apache.org/jira/browse/HIVE-4629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dong Chen updated HIVE-4629:
----------------------------
Attachment: HIVE-4629.4.patch
A patch HIVE-4629.4.patch is attached, which trying to address the comments in
this jira and review board, to support an API to retrieve query logs.
This patch is developed based on HIVE-4629.3.patch code in this jira and refer
to the method of saving operation log to files in HIVE-5924.
RB entry: https://reviews.apache.org/r/24293/
The design and changes are as follows:
1. Reuse FetchResults() API and add a TFetchType in the param. The type could
be QUERY_OUTPUT and LOG.
2. Original LogManager code is modified and moved in OperationManager. Now OM
is responsible for dispatching log updating and fetching request.
3. OperatinLog class wraps the actual operation log files. Each Operation
create, register, and unregister the OperationLog around its run() method.
4. Make OperationLog to ThreadLocal, so that we don't have to bind and maintain
them with threads in some Maps.
5. The actual operation log files are maintained in the hierarchy like:
rootDir/sessionDir/operationLogFiles
The rootDir is configurable, created when SessionManager init, deleted when
stop.
The sessionDir is created when session is opened, and deleted during closing.
The operationLogFiles is create before operation runs, and deleted when it is
closed.
> HS2 should support an API to retrieve query logs
> ------------------------------------------------
>
> Key: HIVE-4629
> URL: https://issues.apache.org/jira/browse/HIVE-4629
> Project: Hive
> Issue Type: Sub-task
> Components: HiveServer2
> Reporter: Shreepadma Venugopalan
> Assignee: Shreepadma Venugopalan
> Attachments: HIVE-4629-no_thrift.1.patch, HIVE-4629.1.patch,
> HIVE-4629.2.patch, HIVE-4629.3.patch.txt, HIVE-4629.4.patch
>
>
> HiveServer2 should support an API to retrieve query logs. This is
> particularly relevant because HiveServer2 supports async execution but
> doesn't provide a way to report progress. Providing an API to retrieve query
> logs will help report progress to the client.
--
This message was sent by Atlassian JIRA
(v6.2#6252)