/** * Create Runnables to encapsulate reduce tasks for use by the executor * service. * @param jobId the job id * @param mapOutputFiles a mapping from task attempts to output files * @return a List of Runnables, one per reduce task. */ protected List<RunnableWithThrowable> getReduceTaskRunnables( JobID jobId, Map<TaskAttemptID, MapOutputFile> mapOutputFiles) { int taskId = 0; ArrayList<RunnableWithThrowable> list = new ArrayList<RunnableWithThrowable>(); for (int i = 0; i < this.numReduceTasks; i++) { list.add(new ReduceTaskRunnable(taskId++, jobId, mapOutputFiles)); } return list; }
/** * Create Runnables to encapsulate reduce tasks for use by the executor * service. * @param jobId the job id * @param mapOutputFiles a mapping from task attempts to output files * @return a List of Runnables, one per reduce task. */ protected List<RunnableWithThrowable> getReduceTaskRunnables( JobID jobId, Map<TaskAttemptID, MapOutputFile> mapOutputFiles) { int taskId = 0; ArrayList<RunnableWithThrowable> list = new ArrayList<RunnableWithThrowable>(); for (int i = 0; i < this.numReduceTasks; i++) { list.add(new ReduceTaskRunnable(taskId++, jobId, mapOutputFiles)); } return list; }
/** * Create Runnables to encapsulate reduce tasks for use by the executor * service. * @param jobId the job id * @param mapOutputFiles a mapping from task attempts to output files * @return a List of Runnables, one per reduce task. */ protected List<RunnableWithThrowable> getReduceTaskRunnables( JobID jobId, Map<TaskAttemptID, MapOutputFile> mapOutputFiles) { int taskId = 0; ArrayList<RunnableWithThrowable> list = new ArrayList<RunnableWithThrowable>(); for (int i = 0; i < this.numReduceTasks; i++) { list.add(new ReduceTaskRunnable(taskId++, jobId, mapOutputFiles)); } return list; }
/** * Create Runnables to encapsulate reduce tasks for use by the executor * service. * @param jobId the job id * @param mapOutputFiles a mapping from task attempts to output files * @return a List of Runnables, one per reduce task. */ protected List<RunnableWithThrowable> getReduceTaskRunnables( JobID jobId, Map<TaskAttemptID, MapOutputFile> mapOutputFiles) { int taskId = 0; ArrayList<RunnableWithThrowable> list = new ArrayList<RunnableWithThrowable>(); for (int i = 0; i < this.numReduceTasks; i++) { list.add(new ReduceTaskRunnable(taskId++, jobId, mapOutputFiles)); } return list; }