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

Aihua Xu commented on HIVE-13410:
---------------------------------

[~szehon] The code looks good. Question about the unit tests: seems we are not 
testing if metrics scopes are closed or not when the exception happens. Would 
it be reasonable to test them? Not sure if we can test it or not;  Seems we can 
remove class variable metrics and remove {{metrics = (CodahaleMetrics) 
MetricsFactory.getInstance();}} from setup() and before() since we are getting 
a local variable metrics in each test function.

> PerfLog metrics scopes not closed if there are exceptions on HS2
> ----------------------------------------------------------------
>
>                 Key: HIVE-13410
>                 URL: https://issues.apache.org/jira/browse/HIVE-13410
>             Project: Hive
>          Issue Type: Bug
>          Components: Diagnosability
>    Affects Versions: 2.0.0
>            Reporter: Szehon Ho
>            Assignee: Szehon Ho
>         Attachments: HIVE-13410.patch
>
>
> If there are errors, the HS2 PerfLog api scopes are not closed.  Then there 
> are sometimes messages like 'java.io.IOException: Scope named api_parse is 
> not closed, cannot be opened.'
> I had simply forgetting to close the dangling scopes if there is an 
> exception.  Doing so now.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to