public static SessionExpirationTracker create(HiveConf conf, RestartImpl restartImpl) {
    long sessionLifetimeMs = conf.getTimeVar(
        ConfVars.HIVE_SERVER2_TEZ_SESSION_LIFETIME, TimeUnit.MILLISECONDS);
    if (sessionLifetimeMs == 0) return null;
    return new SessionExpirationTracker(sessionLifetimeMs, conf.getTimeVar(
        ConfVars.HIVE_SERVER2_TEZ_SESSION_LIFETIME_JITTER, TimeUnit.MILLISECONDS), restartImpl);
  }
The background restart queue that is populated when expiration is triggered by a foreground
thread (i.e. getting or returning a session), to avoid delaying it.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/SessionExpirationTracker.java