public synchronized boolean isRunning() {
    return !shutdown && (!running.isEmpty() || !runnable.isEmpty());
  }
Handles the queue of tasks that should be executed by the driver.
ql/src/java/org/apache/hadoop/hive/ql/TaskQueue.java