public void closeNonDefaultSessions() throws Exception {
    List<TezSessionState> sessionsToClose = null;
    synchronized (openSessions) {
      sessionsToClose = new ArrayList<TezSessionState>(openSessions);
    }
    for (TezSessionState sessionState : sessionsToClose) {
      System.err.println("Shutting down tez session.");
      closeIfNotDefault(sessionState, false);
    }
  }
Reopens the session that was found to not be running.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManager.java