Enable scheduled queries

Scheduled queries are created in disabled mode by default in CDP. This default is intended to prevent running scheduled queries without explicitly enabling them, as they can keep the cluster awake.

To enable a particular schedule, for example schedule1, you execute the ALTER SCHEDULED QUERY statement:

ALTER SCHEDULED QUERY schedule1 ENABLE;   

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.