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

Amareshwari Sriramadasu commented on HIVE-11485:
------------------------------------------------

[~xuefuz], Please go through if the following makes sense.

Asynchronous queries are meant to be for long running queries. They can take 
time from few minutes to hours to days depending on cluster load and data being 
queried. I agree one would need a session to launch an asynchronous query. But 
clients can get status of asynchronous queries from a different session as well 
and fetch results from different session. And the ask here is if launched 
session closed/expired by server, the query should not fail. Causing it to fail 
results in wastage of resources. And query is killed because of a session 
expiry by server, it is unfair to the user.

bq. Leaving these operations behind after session is closed creates hazard in 
managing the operations and depletes server resources.
We should enforce clients should call close operation for asynchronous 
operations. All other sync operations are closed immediately by HiveSession 
right now. The only operations closed upon session close are async operations, 
which is unfair in my opinion.
If we still see orphan operations, we should add an expiry and close the 
operations. Thoughts?

> Session close should not close async SQL operations
> ---------------------------------------------------
>
>                 Key: HIVE-11485
>                 URL: https://issues.apache.org/jira/browse/HIVE-11485
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Deepak Barr
>         Attachments: HIVE-11485.master.patch
>
>
> Right now, session close on HiveServer closes all operations. But, queries 
> running are actually available across sessions and they are not tied to a 
> session (expect the launch - which requires configuration and resources). And 
> it allows getting the status of the query across sessions.
> But session close of the session ( on which operation is launched) closes all 
> the operations as well. 
> So, we should avoid closing all operations upon closing a session.



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

Reply via email to