[
https://issues.apache.org/jira/browse/IMPALA-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16852106#comment-16852106
]
ASF subversion and git services commented on IMPALA-1653:
---------------------------------------------------------
Commit b1cb879577f1e7ea8b6ea1e72c856eee0a582627 in impala's branch
refs/heads/master from Thomas Tauber-Marshall
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=b1cb879 ]
IMPALA-1653: Don't close hiveserver2 session when connection is closed
Currently, when a client connection is closed, we always close any
session started over that connection. This is a requirement for
beeswax, which always ties sessions to connections, but it is not
required for hiveserver2, which allows sessions to be used across
connections with a session token.
This patch changes this behavior so that hiveserver2 sessions are no
longer closed when the corresponding connection is closed.
One downside of this change is that clients may inadvertently leave
sessions open indefinitely if they close their connection without
calling CloseSession(), which can waste space on the coordinator.
We already have a flag --idle_session_timeout, but this flag is off
by default and sessions that hit this timeout are expired but not
fully closed.
Rather than changing the default idle session behavior, which could
affect existing users, this patch mitigates this issue by adding a
new flag: --disconnected_session_timeout which is set to 1 hour by
default. When a session has had no open connections for longer than
this time, it will be closed and any associated queries will be
unregistered.
Testing:
- Added e2e tests.
Change-Id: Ia4555cd9b73db5b4dde92cd4fac4f9bfa3664d78
Reviewed-on: http://gerrit.cloudera.org:8080/13306
Reviewed-by: Tim Armstrong <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Impala should not close a session when a HiveServer2 connection is closed
> -------------------------------------------------------------------------
>
> Key: IMPALA-1653
> URL: https://issues.apache.org/jira/browse/IMPALA-1653
> Project: IMPALA
> Issue Type: New Feature
> Components: Clients
> Affects Versions: Impala 2.1
> Reporter: Erick Tryzelaar
> Assignee: Thomas Tauber-Marshall
> Priority: Minor
> Labels: ramp-up
>
> Hue is currently [stateful|https://issues.cloudera.org/browse/HUE-2530]
> because in [IMPALA-564|https://issues.cloudera.org/browse/IMPALA-564], Impala
> will close the session if the connection is closed. Among other things, this
> prevents us from stateless load balancing because we need to route users to
> the same Hue backend that holds open the Impala socket.
> According to the [HiveServer2 design
> document|https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Thrift+API],
> the HS2 protocol allows for the session to independent from the connection.
> Adding supporting this might not be too difficult. The connection is
> explicitly closed
> [here|https://github.com/cloudera/Impala/blob/master/be/src/service/impala-server.cc#L1696-L1702],
> and it's possible removing this block for HS2 connections might be
> sufficient to enable this feature.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]