public void closeAndRestartExpiredSession(
      TezSessionPoolSession session) throws Exception {
    sessionRestartImpl.closeAndReopenExpiredSession(session);
  }
Logic for the thread that tracks session expiration and restarts sessions in background.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/SessionExpirationTracker.java