How to set the query timeout in Impala?
In Impala, you can control the execution time of a query by setting a timeout for the query. You can use the SET statement to specify the timeout for a query as follows:
SET QUERY_TIMEOUT_S=60;
The statement above sets the timeout for the query to 60 seconds. If the execution time of the query exceeds the set timeout, the query will be canceled and an error message will be returned.
Additionally, you can set a global query timeout in Impala by configuring the configuration file. Simply add the following configuration item in the Impala configuration file.
query_timeout_s=60
The above configuration sets the global query timeout to 60 seconds, so all queries will be limited by this timeout.