Enable scheduled queries

You need to know how to enable and disable scheduled queries and understand how the default state can prevent you from running a query unintentionally.

Scheduled queries are created in disabled mode by default in CDP. This default helps prevent you from running new scheduled queries inadvertantly. You must explicitly enable new scheduled queries. An scheduled query can keep the cluster awake at the wrong time. To enable a particular schedule, for example schedule1, you execute the ALTER SCHEDULED QUERY statement:


To disable this schedule: ALTER SCHEDULED QUERY schedule1 DISABLE;

To enable all newly created schedules in CDP Private Cloud Base, follow these steps:

  1. In Cloudera Manager, click Clusters > Hive on TEZ > Configuration
  2. In Search, enter safety.
  3. In Hive Service Advanced Configuration Snippet (Safety Valve) for hive-site.xml HIVE_ON_TEZ-1 (Service-Wide), click + and add the following property: hive.scheduled.queries.create.as.enabled
  4. Set the value to true.
  5. Save and restart Hive on Tez.