private TezSessionState getNewSessionState(HiveConf conf,
      String queueName, boolean doOpen) throws Exception {
    TezSessionPoolSession retTezSessionState = createAndInitSession(queueName, false, conf);
    if (queueName != null) {
      conf.set(TezConfiguration.TEZ_QUEUE_NAME, queueName);
    }
    if (doOpen) {
      retTezSessionState.open();
      LOG.info("Started a new session for queue: " + queueName +
          " session id: " + retTezSessionState.getSessionId());
    }
    return retTezSessionState;
  }
@param conf HiveConf that is used to initialize the session
@param queueName could be null. Set in the tez session.
@param doOpen
@return
@throws Exception
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManager.java