private ExecutionMode getExecutionMode(QueryPlan plan, List<ExecDriver> mrTasks,
        List<TezTask> tezTasks) {
      if (tezTasks.size() > 0) {
        // Need to go in and check if any of the tasks is running in LLAP mode.
        for (TezTask tezTask : tezTasks) {
          if (tezTask.getWork().getLlapMode()) {
            return ExecutionMode.LLAP;
          }
        }
        return ExecutionMode.TEZ;
      } else if (mrTasks.size() > 0) {
        return ExecutionMode.MR;
      } else {
        return ExecutionMode.NONE;
      }
    }
Log events from hive hook using protobuf serialized format, partitioned by date.
ql/src/java/org/apache/hadoop/hive/ql/hooks/HiveProtoLoggingHook.java