List of usage examples for org.apache.hadoop.mapreduce TaskType JOB_SETUP
TaskType JOB_SETUP
To view the source code for org.apache.hadoop.mapreduce TaskType JOB_SETUP.
Click Source Link
From source file:cascading.stats.hadoop.HadoopNodeStats.java
License:Open Source License
/** * Retrieves the TaskReports via the mapreduce API. * * @param kind The kind of TaskReport to retrieve. * @return An array of TaskReports, but never <code>nul</code>. * @throws IOException/*from ww w . j av a2 s . co m*/ */ private TaskReport[] retrieveTaskReports(HadoopSliceStats.Kind kind) throws IOException, InterruptedException { Job job = HadoopStepStats.getJob(getJobStatusClient()); if (job == null) return new TaskReport[0]; switch (kind) { case MAPPER: return job.getTaskReports(TaskType.MAP); case REDUCER: return job.getTaskReports(TaskType.REDUCE); case SETUP: return job.getTaskReports(TaskType.JOB_SETUP); case CLEANUP: return job.getTaskReports(TaskType.JOB_CLEANUP); default: return new TaskReport[0]; } }
From source file:com.asakusafw.runtime.compatibility.hadoop2.JobCompatibilityHadoop2.java
License:Apache License
@Override public TaskID newTaskId(JobID jobId) { if (jobId == null) { throw new IllegalArgumentException("jobId must not be null"); //$NON-NLS-1$ }//from www . j a v a 2s.c o m if (TASK_ID_MR2 != null) { TaskID result = newTaskIdMr2(jobId, TaskType.JOB_SETUP, 0); if (result != null) { return result; } } return newTaskIdMr1(jobId, true, 0); }
From source file:org.apache.beam.sdk.io.hadoop.format.HadoopFormats.java
License:Apache License
/** * Creates new setup {@link TaskAttemptContext} from hadoop {@link Configuration} and {@link * JobID}.//from w ww.j ava2 s . c o m * * @param conf hadoop {@link Configuration} * @param jobID jobId of the created {@link TaskAttemptContext} * @return new setup {@link TaskAttemptContext} */ static TaskAttemptContext createSetupTaskContext(Configuration conf, JobID jobID) { final TaskID taskId = new TaskID(jobID, TaskType.JOB_SETUP, 0); return createTaskAttemptContext(conf, new TaskAttemptID(taskId, 0)); }
From source file:org.apache.ignite.internal.processors.hadoop.impl.v2.HadoopV2TaskContext.java
License:Apache License
/** * @param type Task type.//from w w w . j ava 2 s. c o m * @return Hadoop task type. */ private TaskType taskType(HadoopTaskType type) { switch (type) { case SETUP: return TaskType.JOB_SETUP; case MAP: case COMBINE: return TaskType.MAP; case REDUCE: return TaskType.REDUCE; case COMMIT: case ABORT: return TaskType.JOB_CLEANUP; default: return null; } }
From source file:org.apache.ignite.internal.processors.hadoop.v2.GridHadoopV2TaskContext.java
License:Apache License
/** * @param type Task type.//from ww w. j ava 2 s .com * @return Hadoop task type. */ private TaskType taskType(GridHadoopTaskType type) { switch (type) { case SETUP: return TaskType.JOB_SETUP; case MAP: case COMBINE: return TaskType.MAP; case REDUCE: return TaskType.REDUCE; case COMMIT: case ABORT: return TaskType.JOB_CLEANUP; default: return null; } }