Enable a resource plan

You can enable, and optionally activate, a resource plan to manage a workload by running a query.

  • You connected to HiveServer over ODBC or JDBC on the cluster you want to manage.
  • You started Hive from the Beeline shell or opened DAS or antoher Hive UI.

Part of the procedure for enabling the resource plan is to validate the plan. Enabling the plan does not apply the plan to a query workload. You cannot modify the plan while enabled. You can enable multiple plans, but you can activate only one at a time on a cluster. Enabling and activating the plan also validates the plan.

  1. Validate the resource plan called myplan.
    ALTER RESOURCE PLAN myplan VALIDATE;
  2. Enable the resource plan using one of the following methods, depending on whether or not you want to activate the plan now or later and if you already have another plan activated.
    • Enable the resource plan:
      ALTER RESOURCE PLAN myplan ENABLE;
    • Enable and activate the resource plan:
      ALTER RESOURCE PLAN myplan ENABLE ACTIVATE;
    • Archive the active resource plan and replace it with the named resource plan:
      ALTER RESOURCE PLAN myplan ENABLE ACTIVATE WITH REPLACE