public static Set<Operator<?>> getAllFetchOperators(FetchTask task) {
    if (task.getWork().getSource() == null)  {
      return Collections.EMPTY_SET;
    }
    Set<Operator<?>> operatorList =  new HashSet<>();
    operatorList.add(task.getWork().getSource());
    return getAllOperatorsForSimpleFetch(operatorList);
  }
Given a {@link FetchTask} this returns a set of all the operators within the task
@param task - Fetch Task
ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java