06-14-2019 12:09 AM
We're on version CDH 5.12.2.
On Cloudera Manager, Impala -> Query , I see query that is "Executing" but query status is "Finished".
query_duration was 42/51 mins.
User is running query on Hue.
I've searched through official papers, google it, but getting nowhere.
Did user left Hue before getting query result?
Can anyone give me explanation on this?
06-18-2019 05:51 PM
Hi @Hail2Ichi ,
Hue does not close the connection to Impala until the results page is clicked on. Clicking the results page in Hue executes the fetchresults call to Impala.
Since Impala queries are client driven ( for example, until client calls fetch to complete fetching entire result set), the query still remains in a running state. And when a query has not been closed/unregistered, Impala shows it in the In Flight section in its web UI. Cloudera Manager shows all In Flight queries as Executing.
To mitigate this problem, we need to ask Impala to kill any idle sessions if not used, so that resources will be released. In order to do this, we need to set the timeout value for the idle sessions. When a session ends, all its sessions are closed. Follow below steps:
Set session timeout parameter (value is in seconds).
--idle_session_timeout=<the maximum lifetime of your queries>
Note: How long to timeout the session will depend on end users' usage. Ideally to be at least 1-2 hours so that Hue user does not have to keep refreshing the Impala Editor page. Example:
We also document above in more detail in below knowledge article:
Finished Queries show as Executing in the Cloudera Manager Impala Queries Page:
Thanks and hope this helps,
06-18-2019 06:36 PM
idle session timeout didn't help me. It seems Hue keeps Impala connection and keeps communicating with Impala coordinator when the query is in flight. The only way to close any open connection is to logoff from the HUE or Close the HUE session from http://<<Query-Coordinator>>:25000/sessions.