Skip to content

Commit

Permalink
make it configurable to retrieve reducer task reports in JobWarnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheolsoo Park committed Jul 5, 2014
1 parent 6668301 commit bbeed2d
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,17 @@ public List<String> findSkewedReducers(List<ReducerDuration> reducerTimes) {
}

public List<ReducerDuration> enumerateReducerRunTimesAccending(JobClient jobClient, String jobId) {
try {
TaskReport[] reduceTasks = jobClient.getReduceTaskReports(jobId);
return enumerateReducerRunTimesAccending(reduceTasks);
} catch (IOException e) {
log.error("Error getting reduce task reports, continuing", e);
return Lists.newArrayList();
if (!jobClient.getConf().getBoolean("pig.stats.notaskreport", false)) {
try {
TaskReport[] reduceTasks = jobClient.getReduceTaskReports(jobId);
return enumerateReducerRunTimesAccending(reduceTasks);
} catch (IOException e) {
log.error("Error getting reduce task reports, continuing", e);
}
} else {
log.info("Skipping reduce task reports for job " + jobId);
}
return Lists.newArrayList();
}

/* Extract all running or completed reducer tasks for the job, their runtime and sort them
Expand Down

0 comments on commit bbeed2d

Please sign in to comment.