Client fetch wait timer

The client fetch wait timer determines how long a query is kept open waiting for a client action. Tuning the timer settings as described here can improve Impala performance.

By: Manish Maheshwari, Data Architect and Data Scientist at Cloudera, Inc.

Description and cause:

If the client, such as Hue, keeps the query open for pagination, the query is kept running during this time although admission control resources are released. This situation generates a message similar to the following:

     Rows available: 1.1m (65504301365)
     First row fetched: 1.1m (66268304867)
     Unregister query: 4.1h (14710907024740)
ImpalaServer
     - ClientFetchWaitTimer: 4.1h (14622894717858)

Solution:

Make sure that Hue and Impala close queries by setting the following properties in Cloudera Manager:

  • In the Hue Service Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini configuration property add the following settings:

    [impala]
         set close_queries=true
         query_timeout_s=<number_of_seconds>
         session_timeout_s=<number_of_seconds>
  • In the Impala service Idle Session Timeout configuration property, add the number of days, hours, minutes, or seconds that you want sessions to remain idle before they are cancelled.
  • In the Impala service Idle Query Timeout configuration property, add the number of days, hours, minutes, or seconds that you want queries to remain idle before they are cancelled.

Do not forget to restart the services in Cloudera Manager after you change the configuration properties.