private void checkShutdown() throws HiveException {
    if (shutdown) {
      throw new HiveException("FAILED: Operation cancelled");
    }
  }
Polls running tasks to see if a task has ended.

@return The result object for any completed/failed task
ql/src/java/org/apache/hadoop/hive/ql/TaskQueue.java