- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Impala query that is "Executing" but query status is "Finished"
- Labels:
-
Apache Impala
-
Cloudera Manager
Created on ‎06-14-2019 12:09 AM - edited ‎09-16-2022 07:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
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?
Thank you!
Created ‎06-18-2019 05:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- From Cloudera Manager UI, navigate to Impala > Configuration > Service-Wide > Advanced > Impala Command Line Argument Advanced Configuration Snippet (Safety Valve).
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:
--idle_session_timeout=3600
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,
Li
Li Wang, Technical Solution Manager
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:
Created ‎06-18-2019 02:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎06-18-2019 05:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- From Cloudera Manager UI, navigate to Impala > Configuration > Service-Wide > Advanced > Impala Command Line Argument Advanced Configuration Snippet (Safety Valve).
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:
--idle_session_timeout=3600
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,
Li
Li Wang, Technical Solution Manager
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:
Created ‎06-18-2019 06:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
We're planning to move from Hue now.
Created ‎06-18-2019 06:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
