public static void endStart(SessionState startSs)
      throws CancellationException, InterruptedException {
    if (startSs.tezSessionState == null) {
      return;
    }
    startSs.tezSessionState.endOpen();
  }
set current session to existing session object if a thread is running
multiple sessions - it must call this method with the new session object
when switching from one session to another.
ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java