...
The “query” is a single statement expression to be scheduled for execution.
System
...
tables/views
Informations about scheduled queries/executions can be obtain by using the information_schema or the sysdb - recommended way is to use the information_schema; sysdb is tables are there to build the information_schema level views - and for debugging.
...
information_schema.scheduled_executions
This view can be used to get information about recent scheduled query executions.
select * from information_schema.scheduled_executions;
One record in this view has the following informations:
scheduled_execution_id | 13 | Every scheduled query execution has a unique numeric id |
schedule_name | sc1 | The schedule name to which this execution belongs |
executor_query_id | dev_20200131103008_c9a39b8d-e26b-44cd-b8ae-9d054204dc07 | The query id assigned by the execution engine for the given scheduled execution |
state | FINISHED | State of the execution; |
...
can be | ||
start_time | 2020-01-31 10:30:06 | Start time of execution |
end_time | 2020-01-31 10:30:08 | End time of execution |
elapsed | 2 | (computed) end_time-start_time |
error_message | NULL | In case the query is FAILED the error message is shown here |
last_update_time | NULL | During execution the last update time the executor provided informations about the state |
Execution states
INITED | The scheduled execution record is created at the time an executor is assigned to run it; |
EXECUTING | Queries in executing state are being processed by the executor; during this phase the executor reports the progress of the query in intervals defined by: hive.scheduled.queries.executor.progress.report.interval |
FAILED | The query execution stoped by an error code(or an exception) when this state is set the error_message is also filled. |
FINISHED | The query finished without problems |
TIMED_OUT | An execution is considered timed out when it’s being executed for more than metastore.scheduled.queries.execution.timeout. The scheduled queries maintenance task checks for any timed out executions. |
Are these execution informations retained forever?
The scheduled query maintenance task removes older than metastore.scheduled.queries.execution.max.age entries.
Configuration
Hive metastore related configuration
...