@Override
  public List<String> getWmStateDescription() {
    Future<List<String>> future = null;
    currentLock.lock();
    try {
      if (current.dumpStateFuture != null) {
        future = current.dumpStateFuture;
      } else {
        future = current.dumpStateFuture = SettableFuture.create();
        notifyWmThreadUnderLock();
      }
    } finally {
      currentLock.unlock();
    }
    try {
      return future.get();
    } catch (InterruptedException | ExecutionException e) {
      LOG.error("Error getting description", e);
      return Lists.newArrayList("Error: " + e.toString());
    }
  }
Checks if the session is still relevant for WM and if yes, removes it from its thread.
@param isSessionOk Whether the user thinks the session being returned in some way is ok;
                   true means it is (return, reuse); false mean it isn't (reopen, destroy);
                   null means this is not a user call.
@return true if the session was removed; false if the session was already processed by WM
        thread (so we are dealing with an outdated request); null if the session should be
        in WM but wasn't found in the requisite pool (internal error?).
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WorkloadManager.java