Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contentstoc

Intro

Executing statements periodically can be usefull in

...

  • The metastore maintains the scheduled queries in the metastore database
  • The Hiveserver(s) periodically polls the metastore for a scheduled query to be executed
    • During execution informations about ongoing/finished executions are kept in the metastore to help  


Info

Scheduled queries were added in Hive 4.0 (HIVE-21884)

...

  • metastore.scheduled.queries.enabled (default: true)
    Controls the metastore side support for scheduled queries; forces all HMS scheduled query related endpoints to return with an error
  • metastore.scheduled.queries.execution.timeout (default: 2 minutes)
    In case a scheduled execution is not updated for at least this amount of time; it’s state will be changed to TIMED_OUT by the cleaner task
  • metastore.scheduled.queries.execution.maint.task.frequency (default: 1 minute)
    Interval of scheduled query maintenance task. Which removes executions above max age; and marks executions as TIMED_OUT if the condition is met
  • metastore.scheduled.queries.execution.max.age (default: 30 days)
    Maximal age of a scheduled query execution entry before it is removed.

...