You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Aihua Xu (JIRA)" <ji...@apache.org> on 2016/02/24 20:54:19 UTC

[jira] [Updated] (HIVE-13149) Remove some unnecessary HMS connections from HS2

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

Aihua Xu updated HIVE-13149:
----------------------------
    Attachment: HIVE-13149.1.patch

> Remove some unnecessary HMS connections from HS2 
> -------------------------------------------------
>
>                 Key: HIVE-13149
>                 URL: https://issues.apache.org/jira/browse/HIVE-13149
>             Project: Hive
>          Issue Type: Sub-task
>          Components: HiveServer2
>    Affects Versions: 2.0.0
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>         Attachments: HIVE-13149.1.patch
>
>
> In SessionState class, currently we will always try to get a HMS connection in {{start(SessionState startSs, boolean isAsync, LogHelper console)}} regardless of if the connection will be used later or not. 
> When SessionState is accessed by the tasks in TaskRunner.java, although most of the tasks other than some of them like StatsTask, don't need to access HMS, currently a new HMS connection will be established for each thread. If HiveServer2 is configured to run in parallel and the query involves many tasks, then the connections are created but unused.
> {noformat}
>   @Override
>   public void run() {
>     runner = Thread.currentThread();
>     try {
>       OperationLog.setCurrentOperationLog(operationLog);
>       SessionState.start(ss);
>       runSequential();
> {noformat}



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