@Override
  public int execute() throws HiveException, IOException {
    WMTrigger trigger = new WMTrigger(desc.getResourcePlanName(), desc.getTriggerName());
    trigger.setTriggerExpression(desc.getTriggerExpression());
    trigger.setActionExpression(desc.getActionExpression());

    TriggerUtils.validateTrigger(trigger);
    context.getDb().createWMTrigger(trigger);

    return 0;
  }
Operation process of creating a workload management trigger.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/trigger/create/CreateWMTriggerOperation.java