Apache Hive workload management commands
Also available as:
PDF

Workload management command summary

To manage your workload, you can execute Hive commands that resemble the familiar ALTER, CREATE, DROP, and SHOW commands.

Table 1. Command Summary
Name Brief Description Simple Example
ALTER MAPPING Changes the routing of queries to a resource pool. ALTER APPLICATION MAPPING 'myapp' IN myplan UNMANAGED;
ALTER POOL Modifies query pool properties, adds triggers, and removes triggers. ALTER POOL myplan.mypool SET QUERY_PARRALLELISM=10;
ALTER RESOURCE PLAN Enables, disables, activates, validates, or changes a plan. ALTER RESOURCE PLAN myplan RENAME TO yourplan;
ALTER TRIGGER Adds a trigger to or removes a trigger from a resource pool. ALTER TRIGGER myplan.mytrigger DROP FROM POOL mypool;
CREATE MAPPING Routes queries to a resource pool. CREATE APPLICATION MAPPING 'myapp' IN myplan TO mypool WITH ORDER 2;
CREATE POOL Creates and adds a query pool for a resource plan. CREATE POOL myplan.mypool WITH ALLOC_FRACTION=75 AND QUERY_PARALLELISM=5;
CREATE RESOURCE PLAN Creates a resource plan CREATE RESOURCE PLAN myplan;
CREATE TRIGGER Establishes and adds a trigger to a resource plan. CREATE TRIGGER myplan.mytrigger WHEN ELAPSED_TIME > 30min DO KILL;
DISABLE WORKLOAD MANAGEMENT Deactivates the existing resource plan. DISABLE WORKLOAD MANAGEMENT;
DROP MAPPING Removes a mapping from a resource plan. DROP APPLICATION MAPPING 'myapp' IN myplan;
DROP POOL Removes a query pool from a resource plan. DROP POOL myplan.mypool;
DROP RESOURCE PLAN Deletes a resource plan. DROP RESOURCE PLAN myplan;
DROP TRIGGER Deletes a trigger from a resource plan. DROP myplan.mytrigger;
REPLACE RESOURCE PLAN WITH Replaces the contents of one resource plan with the contents of another. REPLACE ACTIVE RESOURCE PLAN WITH myplan;
SHOW RESOURCE PLAN Lists plan contents. SHOW RESOURCE PLAN myplan;
SHOW RESOURCE PLANS Lists all resource plans. SHOW RESOURCE PLANS;