static void reopenInternal(
      TezSessionState sessionState) throws Exception {
    // TODO: close basically resets the object to a bunch of nulls.
    //       We should ideally not reuse the object because it's pointless and error-prone.
    sessionState.close(true);
    // Note: scratchdir is reused implicitly because the sessionId is the same.
    sessionState.open(sessionState.extractHiveResources());
  }
Reopens the session that was found to not be running.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManager.java