private void configureAmRegistry(SessionType session) {
    if (amRegistryName != null) {
      bySessionId.put(session.getSessionId(), session);
      HiveConf conf = session.getConf();
      conf.set(ConfVars.LLAP_TASK_SCHEDULER_AM_REGISTRY_NAME.varname, amRegistryName);
      conf.set(ConfVars.HIVE_SESSION_ID.varname, session.getSessionId());
    }
  }
Puts session back into the pool.
@return true if the session has been put back; false if it's not needed and should be killed.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPool.java