hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aihua Xu (JIRA)" <>
Subject [jira] [Commented] (HIVE-13149) Remove some unnecessary HMS connections from HS2
Date Wed, 06 Apr 2016 00:52:25 GMT


Aihua Xu commented on HIVE-13149:

[] Agree that making copy of HiveConf is expensive so this patch will save a lot
of copies rather than adding copy of HiveConf. Currently each thread will make a copy through
{{Hive.get(new HiveConf(startSs.conf)).getMSC();}}. We are removing that clone but just clone
when necessary. 

I don't see how ThreadLocal would help in here. Actually Hive.get(HiveConf) is causing issue
since the callers in many places are not cloning HiveConf and get(HiveConf) probably is comparing
HiveConf to itself. 

I will evaluate the logic in the followup to simplify it though.

> Remove some unnecessary HMS connections from HS2 
> -------------------------------------------------
>                 Key: HIVE-13149
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>          Components: HiveServer2
>    Affects Versions: 2.0.0
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>         Attachments: HIVE-13149.1.patch, HIVE-13149.2.patch, HIVE-13149.3.patch, HIVE-13149.4.patch,
HIVE-13149.5.patch, HIVE-13149.6.patch, HIVE-13149.7.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, although most of the tasks
other than some like StatsTask, don't need to access HMS. Currently a new HMS connection will
be established for each Task 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

View raw message