private String lockNameFor(ScheduledQueryKey scheduleKey) {
      return String.format("scheduled_query_%s_%s", scheduleKey.getClusterNamespace(), scheduleKey.getScheduleName());
    }
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