Setting Timeout and Retries for Thrift Connections to Backend Client

Impala connections to the backend client are subject to failure in cases when the network is momentarily overloaded.

To avoid failed queries due to transient network problems, you can configure the number of Thrift connection retries using the following option:

  1. Log in to the CDP web interface and navigate to the Data Warehouse service.
  2. In the Data Warehouse service, click Virtual Warehouses in the left navigation panel.
  3. Select the Impala Virtual Warehouse, click options for the warehouse you want to set the timeout and retry options.
  4. Click Edit and navigate to Impala Coordinatorunder Configurationstab.
  5. Using the + sign, specify the following if the options are not already added.

    To avoid failed queries due to transient network problems, you can configure the number of Thrift connection retries using the following option:

    • The --backend_client_connection_num_retries option specifies the number of times Impala will try connecting to the backend client after the first connection attempt fails. By default, impalad will attempt three re-connections before it returns a failure.

    You can configure timeouts for sending and receiving data from the backend client. Therefore, if for some reason a query does not respond, instead of waiting indefinitely for a response, Impala will terminate the connection after a configurable timeout.

    • The --backend_client_rpc_timeout_ms option can be used to specify the number of milliseconds Impala should wait for a response from the backend client before it terminates the connection and signals a failure. The default value for this property is 300000 milliseconds, or 5 minutes.
  6. Click Apply and restart Impala.