private TezSessionState getNewTezSessionOnError(
      TezSessionState oldSession) throws Exception {
    // Note: we don't pass the config to reopen. If the session was already open, it would
    //       have kept running with its current config - preserve that behavior.
    TezSessionState newSession = oldSession.reopen();
    console.printInfo("Session re-established.");
    return newSession;
  }
Ensures that the Tez Session is open and the AM has all necessary jars configured.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java