public void initTriggers(final HiveConf conf) {
    if (triggerValidatorRunnable == null) {
      final long triggerValidationIntervalMs = HiveConf.getTimeVar(conf, ConfVars
        .HIVE_TRIGGER_VALIDATION_INTERVAL, TimeUnit.MILLISECONDS);
      sessionTriggerProvider = new SessionTriggerProvider(openSessions, new LinkedList<>());
      triggerActionHandler = new KillTriggerActionHandler();
      triggerValidatorRunnable = new TriggerValidatorRunnable(
          sessionTriggerProvider, triggerActionHandler);
      startTriggerValidator(triggerValidationIntervalMs);
    }
  }
Note: this is not thread-safe.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManager.java