public static Action fromMetastoreExpression(String metastoreActionExpression) {
    ParseDriver driver = new ParseDriver();
    ASTNode node = null;
    try {
      node = driver.parseTriggerActionExpression(metastoreActionExpression);
    } catch (ParseException e) {
      throw new IllegalArgumentException(
          "Invalid action expression: " + metastoreActionExpression, e);
    }
    if (node == null || node.getChildCount() != 2 ||
        node.getChild(1).getType() != HiveParser.EOF) {
      throw new IllegalArgumentException(
          "Invalid action expression: " + metastoreActionExpression);
    }
    node = (ASTNode) node.getChild(0);
    switch (node.getType()) {
    case HiveParser.KW_KILL:
      if (node.getChildCount() != 0) {
        throw new IllegalArgumentException("Invalid KILL action");
      }
      return new Action(Type.KILL_QUERY);
    case HiveParser.KW_MOVE: {
      if (node.getChildCount() != 1) {
        throw new IllegalArgumentException("Invalid move to action, expected poolPath");
      }
      Tree poolNode = node.getChild(0);
      StringBuilder poolPath = new StringBuilder(poolNode.getText());
      for (int i = 0; i < poolNode.getChildCount(); ++i) {
        poolPath.append(poolNode.getChild(i).getText());
      }
      return new Action(Type.MOVE_TO_POOL, poolPath.toString());
    }
    default:
      throw new IllegalArgumentException("Unhandled action expression, type: " + node.getType() +
          ": " + metastoreActionExpression);
    }
  }
Action that gets invoked for trigger violations.
ql/src/java/org/apache/hadoop/hive/ql/wm/Action.java