public void endEvent(final WmTezSession sessionState) {
    this.wmTezSessionInfo = new WmTezSessionInfo(sessionState);
    this.eventEndTimestamp = System.currentTimeMillis();
    this.elapsedTime = eventEndTimestamp - eventStartTimestamp;
    WmContext wmContext = sessionState.getWmContext();
    if (wmContext != null) {
      wmContext.addWMEvent(this);
      LOG.info("Added WMEvent: {}", this);
    }
  }
Workload Manager events at query level.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WmEvent.java