01-27-2017 08:06 AM
How to kill or cancel a query if it is running longer than normal automatically, i killed queries that are running longer from cloudera manager. but want something automated way.
Please provide details if there is a possibility.
Thank you very much for the helpful info.
01-28-2017 12:21 PM
01-30-2017 08:26 AM
As far I am concerned I dont think there is no way to dectect them kill automatically .
One way to slove the long runining query is to inspect your query flow , streaming also enable
strict mode - In this mode some risky query will not be performed like cartesian product , ordering without limit clause.
02-04-2017 03:25 AM
02-04-2017 10:25 AM
There is no direct way of enforcing a strict mode to Impala
However you can cotrol the run time behaviour of the queries by issuing SET statement
for example controling the memory limit , max_scan_range_lenth
Please refer this link
11-30-2018 02:22 AM
I use the below trick in shell scripts for known queries that don't have an impact if killed.
I call the impala-shell from bash/cron using the below line
timeout 600 impala-shell -i $IMPALA_ADDRESS -q "compute stats hive_db.table_name;"
The all important part is "timeout 600" which will end the session after 10 mins.