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

Chengxiang Li commented on HIVE-9289:
-------------------------------------

We does reuse session for queries from same client, [~xuefuz], I verified 
before and i just did again, just may not work in the way we thought before.
HiveServer2 introduce a new approach to manager session, every RPC call 
references a session ID which the server then maps to persistent session 
state,the linear mapping is like: Hive Client->SessionHandler(session id 
inside)\->HiveSessionImpl->SessionState.  For Hive on Spark, as we would like 
to share the singleton SparkContext for a user session, we may expand the 
linear mapping like: Hive Client->SessionHandler(session id inside)\-> 
HiveSessionImpl->SessionState->SparkSession->SparkClient->RemoteDriver->SparkContext,
 with only exception: create new SparkSession while spark configuration update.
Hive Client->SessionHandler(session id inside)->HiveSessionImpl mapping should 
already ensure that whether Hive session should reused, I think we do not need 
to check again by user name in SparkSessionManager unless we have other reasons 
to create new SparkSession beside spark configuration update.
[~chinnalalam], I just read related code today, not sure if i fully understand 
it, do you have any idea about it?

> TODO : Store user name in session [Spark Branch]
> ------------------------------------------------
>
>                 Key: HIVE-9289
>                 URL: https://issues.apache.org/jira/browse/HIVE-9289
>             Project: Hive
>          Issue Type: Bug
>          Components: Spark
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-9289.1-spark.patch
>
>
> TODO  : this we need to store the session username somewhere else as 
> getUGIForConf never used the conf SparkSessionManagerImpl.java 
> /hive-exec/src/java/org/apache/hadoop/hive/ql/exec/spark/session line 145 
> Java Task



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

Reply via email to