[ 
https://issues.apache.org/jira/browse/HIVE-19133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16430967#comment-16430967
 ] 

Bharathkrishna Guruvayoor Murali edited comment on HIVE-19133 at 4/9/18 8:54 PM:
---------------------------------------------------------------------------------

It was noted that the PerfLogger is passed between the background and handler 
threads which caused the issue.

Hence, resetting the perflogger both in compilation and execution phase so that 
old values present in the maps are cleared.

Also, using queryDisplay.getQueryStartTime() because the DRIVER_RUN value of 
compilation phase is now not available in the execution phase after this change 
because Perflogger is reset.

The main cause of this issue is that perflogger is passed across threads (which 
I feel is kind of abusing the ThreadLocal nature of perflogger).
This happens in 
[https://github.com/apache/hive/blob/a2394c5bf2e5b257a3a1b3e2bda4a25b92005315/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java#L294]

 

I feel we can remove this part where it sets parentPerfLogger, but not doing it 
as I don't know if it is done that way for any specific reason. Anyone who has 
some insights on this please let me know if it can be removed.


was (Author: bharos92):
It was noted that the PerfLogger is passed between the background and handler 
threads which caused the issue.

Hence, resetting the perflogger both in compilation and execution phase so that 
old values present in the maps are cleared.

Also, using queryDisplay.getQueryStartTime() because the DRIVER_RUN value of 
compilation phase is now not available in the execution phase after this change 
because Perflogger is reset.


The main cause of this issue is that perflogger is passed across threads (which 
I feel is kind of abusing the ThreadLocal nature of perflogger).
This happens in 
[https://github.com/apache/hive/blob/a2394c5bf2e5b257a3a1b3e2bda4a25b92005315/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java#L294]

 

I feel we can remove this part where it sets parentPerfLogger, but not doing it 
as I don't know if it serves any specific purpose. Anyone who has some insights 
on this please let me know if it can be removed.

> HS2 WebUI phase-wise performance metrics not showing correctly
> --------------------------------------------------------------
>
>                 Key: HIVE-19133
>                 URL: https://issues.apache.org/jira/browse/HIVE-19133
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2, Web UI
>            Reporter: Bharathkrishna Guruvayoor Murali
>            Assignee: Bharathkrishna Guruvayoor Murali
>            Priority: Major
>         Attachments: HIVE-19133.1.patch, WebUI-compile time query metrics.png
>
>
> The query specific WebUI metrics (go to drilldown -> performance logging) are 
> not showing up in the correct phase and are often mixed up.
> Attaching screenshot.



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

Reply via email to