public void setupNonPool(HiveConf conf) {
    this.initConf = conf;
    numConcurrentLlapQueries = conf.getIntVar(ConfVars.HIVE_SERVER2_LLAP_CONCURRENT_QUERIES);
    llapQueue = new Semaphore(numConcurrentLlapQueries, true);

    String queueAllowedStr = HiveConf.getVar(conf,
        ConfVars.HIVE_SERVER2_TEZ_SESSION_CUSTOM_QUEUE_ALLOWED);
    try {
      this.customQueueAllowed = CustomQueueAllowed.valueOf(queueAllowedStr.toUpperCase());
    } catch (Exception ex) {
      throw new RuntimeException("Invalid value '" + queueAllowedStr + "' for " +
          ConfVars.HIVE_SERVER2_TEZ_SESSION_CUSTOM_QUEUE_ALLOWED.varname);
    }
    if (customQueueAllowed == CustomQueueAllowed.TRUE
        && HiveConf.getBoolVar(conf, ConfVars.HIVE_SERVER2_TEZ_QUEUE_ACCESS_CHECK)) {
      this.yarnQueueChecker = new YarnQueueHelper(conf);
    }

    restrictedConfig = new RestrictedConfigChecker(conf);
  }
Note: this is not thread-safe.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManager.java