public void destroy(WmThreadSyncWork syncWork,
        LinkedList<GetRequest> globalQueue, IdentityHashMap<WmTezSession, GetRequest> toReuse) {
      extractAllSessionsToKill("The query pool was removed by administrator", toReuse, syncWork);
      // All the pending get requests should just be requeued elsewhere.
      // Note that we never queue session reuse so sessionToReuse would be null.
      globalQueue.addAll(0, queue);
      if (metrics != null) {
        metrics.removeQueuedQueries(queue.size());
        metrics.destroy();
      }
      queue.clear();
    }
State of a single pool.
Unless otherwise specified, the members are only modified by the master thread.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WorkloadManager.java