private String getErrorStringForException(Throwable t) {
      if (t instanceof CommandProcessorException) {
        CommandProcessorException cpr = (CommandProcessorException) t;
        return String.format("%s", cpr.getMessage());
      } else {
        return String.format("%s: %s", t.getClass().getName(), t.getMessage());
      }
    }
Responsible for a single execution of a scheduled query.

The execution happens in a separate thread.
ql/src/java/org/apache/hadoop/hive/ql/scheduled/ScheduledQueryExecutionService.java