public boolean isExplain() {
    return rootTasks.size() == 1 && rootTasks.get(0) instanceof ExplainTask;
  }
Extract all the counters from tasks and operators.
ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java