You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Eugene Chung (Jira)" <ji...@apache.org> on 2020/08/07 02:14:00 UTC

[jira] [Commented] (HIVE-17128) Operation Logging leaks file descriptors as the log4j Appender is never closed

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

Eugene Chung commented on HIVE-17128:
-------------------------------------

Unfortunately, it seems not resolved yet.

> Operation Logging leaks file descriptors as the log4j Appender is never closed
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-17128
>                 URL: https://issues.apache.org/jira/browse/HIVE-17128
>             Project: Hive
>          Issue Type: Bug
>          Components: Logging
>            Reporter: Andrew Sherman
>            Assignee: Andrew Sherman
>            Priority: Major
>             Fix For: 3.0.0
>
>         Attachments: HIVE-17128.1.patch, HIVE-17128.2.patch, HIVE-17128.3.patch
>
>
> [HIVE-16061] and [HIVE-16400] changed operation logging to use the Log4j2 RoutingAppender to automatically output the log for each query into each individual operation log file. As log4j does not know when a query is finished it keeps the OutputStream in the Appender open even when the query completes. The stream holds a file descriptor and so we leak file descriptors. Note that we are already careful to close any streams reading from the operation log file.
> h2. Fix
> To fix this we use a technique described in the comments of [LOG4J2-510] which uses reflection to close the appender. The test in TestOperationLoggingLayout will be extended to check that the Appender is closed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)