private TezSessionPoolSession createAndInitSession(
      String queue, boolean isDefault, HiveConf conf) {
    TezSessionPoolSession sessionState = createSession(TezSessionState.makeSessionId(), conf);
    // TODO When will the queue ever be null.
    // Pass queue and default in as constructor parameters, and make them final.
    if (queue != null) {
      sessionState.setQueueName(queue);
    }
    if (isDefault) {
      sessionState.setDefault();
    }
    LOG.info("Created new tez session for queue: " + queue +
        " with session id: " + sessionState.getSessionId());
    return sessionState;
  }
Note: this is not thread-safe.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManager.java