@Override
  public int execute() throws HiveException, IOException {
    boolean forceDeactivate = desc.getResourcePlanName() == null;

    WMNullableResourcePlan resourcePlan = new WMNullableResourcePlan();
    resourcePlan.setStatus(forceDeactivate ? WMResourcePlanStatus.ENABLED : WMResourcePlanStatus.DISABLED);

    WMFullResourcePlan appliedResourcePlan = context.getDb().alterResourcePlan(desc.getResourcePlanName(), resourcePlan,
        false, forceDeactivate, false);

    handleWMServiceChangeIfNeeded(appliedResourcePlan, false, forceDeactivate, false);

    return 0;
  }
Operation process of disabling a resource plan.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/resourceplan/alter/disable/AlterResourcePlanDisableOperation.java