You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Xuefu Zhang (JIRA)" <ji...@apache.org> on 2017/09/18 04:30:00 UTC

[jira] [Assigned] (HIVE-17548) ThriftCliService reports inaccurate the number of current sessions in the log message

     [ https://issues.apache.org/jira/browse/HIVE-17548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xuefu Zhang reassigned HIVE-17548:
----------------------------------

    Assignee: Xuefu Zhang

> ThriftCliService reports inaccurate the number of current sessions in the log message
> -------------------------------------------------------------------------------------
>
>                 Key: HIVE-17548
>                 URL: https://issues.apache.org/jira/browse/HIVE-17548
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>    Affects Versions: 1.1.0
>            Reporter: Xuefu Zhang
>            Assignee: Xuefu Zhang
>
> Currently ThriftCliService uses an atomic integer to keep track of the number of currently open sessions. It reports it through the following two log messages:
> {code}
> 2017-09-18 04:14:31,722 INFO [HiveServer2-Handler-Pool: Thread-729979]: org.apache.hive.service.cli.thrift.ThriftCLIService: Opened a session: SessionHandle [99ec30d7-5c44-4a45-a8d6-0f0e7ecf4879], current sessions: 345
> 2017-09-18 04:14:41,926 INFO [HiveServer2-Handler-Pool: Thread-717542]: org.apache.hive.service.cli.thrift.ThriftCLIService: Closed session: SessionHandle [f38f7890-cba4-459c-872e-4c261b897e00], current sessions: 344
> {code}
> This assumes that all sessions are closed or opened thru Thrift API. This assumption isn't correct because sessions may be closed by the server such as in case of timeout. Therefore, such log messages tends to over-report the number of open sessions.
> In order to accurately report the number of outstanding sessions, session manager should be consulted instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)