hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thejas M Nair (JIRA)" <>
Subject [jira] [Commented] (HIVE-11402) HS2 - disallow parallel query execution within a single Session
Date Wed, 29 Jul 2015 20:24:04 GMT


Thejas M Nair commented on HIVE-11402:

>From [~ekoifman] - Each SessionState has 1 instance of HiveTxnManager which can only handle
1 txn at a time. 
While JDBC spec doesn't make concurrency guarantees explicit, most info on the web says it's
a bad idea to allow this.
For example, suppose you setAutoCommit(false) and then run to statements concurrently on this
Connection, would you expect 1 transaction for each statement or 1 txn for both.

> HS2 - disallow parallel query execution within a single Session
> ---------------------------------------------------------------
>                 Key: HIVE-11402
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Thejas M Nair
> HiveServer2 currently allows concurrent queries to be run in a single session. However,
every HS2 session has  an associated SessionState object, and the use of SessionState in many
places assumes that only one thread is using it, ie it is not thread safe.
> There are many places where SesssionState thread safety needs to be addressed, and until
then we should serialize all query execution for a single HS2 session. This problem can become
more visible with HIVE-4239 now allowing parallel query compilation.
> Note that running queries in parallel for single session is not straightforward  with
jdbc, you need to spawn another thread as the Statement.execute calls are blocking. I believe
ODBC has non blocking query execution API, and Hue is another well known application that
shares sessions for all queries that a user runs.

This message was sent by Atlassian JIRA

View raw message