Search in sources :

Example 1 with ReducerTimeStatsPerJob

use of org.apache.hadoop.hive.ql.plan.ReducerTimeStatsPerJob in project hive by apache.

the class HadoopJobExecHelper method computeReducerTimeStatsPerJob.

private void computeReducerTimeStatsPerJob(RunningJob rj) throws IOException {
    TaskCompletionEvent[] taskCompletions = rj.getTaskCompletionEvents(0);
    List<Integer> reducersRunTimes = new ArrayList<Integer>();
    for (TaskCompletionEvent taskCompletion : taskCompletions) {
        if (!taskCompletion.isMapTask()) {
            reducersRunTimes.add(Integer.valueOf(taskCompletion.getTaskRunTime()));
        }
    }
    // Compute the reducers run time statistics for the job
    ReducerTimeStatsPerJob reducerTimeStatsPerJob = new ReducerTimeStatsPerJob(reducersRunTimes);
    // Adding the reducers run time statistics for the job in the QueryPlan
    this.task.getQueryPlan().getReducerTimeStatsPerJobList().add(reducerTimeStatsPerJob);
    return;
}
Also used : ReducerTimeStatsPerJob(org.apache.hadoop.hive.ql.plan.ReducerTimeStatsPerJob) TaskCompletionEvent(org.apache.hadoop.mapred.TaskCompletionEvent) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 ReducerTimeStatsPerJob (org.apache.hadoop.hive.ql.plan.ReducerTimeStatsPerJob)1 TaskCompletionEvent (org.apache.hadoop.mapred.TaskCompletionEvent)1