Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Impala query that is "Executing" but query status is "Finished"

avatar
Explorer

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!

 

1 ACCEPTED SOLUTION

avatar
Guru

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:

 

  1. From Cloudera Manager UI, navigate to Impala > Configuration > Service-Wide > Advanced > Impala Command Line Argument Advanced Configuration Snippet (Safety Valve).
  2. 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:

https://my.cloudera.com/knowledge/Finished-Queries-show-as-Executing-in-the-Cloudera-Manager?id=7157...

 

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:

Terms of Service

Community Guidelines

How to use the forum

View solution in original post

4 REPLIES 4

avatar
Expert Contributor

Hi @Hail2Ichi,

 

Try to update Impala JDBC Connector.

 

Regards, 

Manu.

avatar
Guru

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:

 

  1. From Cloudera Manager UI, navigate to Impala > Configuration > Service-Wide > Advanced > Impala Command Line Argument Advanced Configuration Snippet (Safety Valve).
  2. 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:

https://my.cloudera.com/knowledge/Finished-Queries-show-as-Executing-in-the-Cloudera-Manager?id=7157...

 

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:

Terms of Service

Community Guidelines

How to use the forum

avatar
Explorer

Thank you!

We're planning to move from Hue now.

 

 

avatar
Explorer

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.