boolean stopUsing() {
    int finalState = shouldExpire() ? STATE_EXPIRED : STATE_NONE;
    if (!sessionState.compareAndSet(STATE_IN_USE, finalState)) {
      throw new AssertionError("Unexpected state change; currently " + sessionState.get());
    }
    if (finalState == STATE_NONE) return true;
    expirationTracker.closeAndRestartExpiredSessionAsync(this);
    return false;
  }
Tries to use this session. When the session is in use, it will not expire.
@return true if the session can be used; false if it has already expired.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolSession.java