org.apache.hadoop.mapred
Class MapTask
java.lang.Object
org.apache.hadoop.mapred.Task
org.apache.hadoop.mapred.MapTask
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.Writable
@InterfaceAudience.LimitedPrivate(value="MapReduce")
@InterfaceStability.Unstable
public class MapTask
- extends Task
A Map task.
Nested classes/interfaces inherited from class org.apache.hadoop.mapred.Task |
Task.CombineOutputCollector<K,V>, Task.CombinerRunner<K,V>, Task.CombineValuesIterator<KEY,VALUE>, Task.Counter, Task.NewCombinerRunner<K,V>, Task.OldCombinerRunner<K,V>, Task.TaskReporter |
Fields inherited from class org.apache.hadoop.mapred.Task |
committer, conf, DEFAULT_MR_COMBINE_RECORDS_BEFORE_PROGRESS, FILESYSTEM_COUNTER_GROUP, jobCleanup, jobContext, jobRunStateForCleanup, jobSetup, jvmContext, lDirAlloc, mapOutputFile, MR_COMBINE_RECORDS_BEFORE_PROGRESS, outputFormat, PROGRESS_INTERVAL, spilledRecordsCounter, taskCleanup, taskContext, tokenSecret, umbilical |
Methods inherited from class org.apache.hadoop.mapred.Task |
createReduceContext, done, getConf, getFileSystemCounterNames, getJobFile, getJobID, getJobTokenSecret, getJvmContext, getMapOutputFile, getNumSlotsRequired, getPartition, getPhase, getProgress, getSkipRanges, getTaskID, getUser, initialize, isSkipping, localizeConfiguration, reportFatalError, reportNextRecordRange, runJobCleanupTask, runJobSetupTask, runTaskCleanupTask, setConf, setJobFile, setJobTokenSecret, setJvmContext, setPhase, setSkipping, setSkipRanges, setWriteSkipRecs, statusUpdate, supportIsolationRunner, toString, toWriteSkipRecs |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MAP_OUTPUT_INDEX_RECORD_LENGTH
public static final int MAP_OUTPUT_INDEX_RECORD_LENGTH
- The size of each record in the index file for the map-outputs.
- See Also:
- Constant Field Values
MapTask
public MapTask()
MapTask
public MapTask(java.lang.String jobFile,
TaskAttemptID taskId,
int partition,
JobSplit.TaskSplitIndex splitIndex,
int numSlotsRequired)
isMapTask
public boolean isMapTask()
- Specified by:
isMapTask
in class Task
writeFilesRequiredForRerun
public void writeFilesRequiredForRerun(JobConf conf)
throws java.io.IOException
- Description copied from class:
Task
- Write files that the IsolationRunner will need to rerun the task.
- Overrides:
writeFilesRequiredForRerun
in class Task
- Throws:
java.io.IOException
createRunner
public org.apache.hadoop.mapred.TaskRunner createRunner(TaskTracker tracker,
org.apache.hadoop.mapred.TaskTracker.TaskInProgress tip,
org.apache.hadoop.mapred.TaskTracker.RunningJob rjob)
throws java.io.IOException
- Description copied from class:
Task
- Return an approprate thread runner for this task.
- Specified by:
createRunner
in class Task
tip
- TODO
- Throws:
java.io.IOException
write
public void write(java.io.DataOutput out)
throws java.io.IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Overrides:
write
in class Task
- Throws:
java.io.IOException
readFields
public void readFields(java.io.DataInput in)
throws java.io.IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Overrides:
readFields
in class Task
- Throws:
java.io.IOException
run
public void run(JobConf job,
TaskUmbilicalProtocol umbilical)
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
- Description copied from class:
Task
- Run this task as a part of the named job. This method is executed in the
child process and is what invokes user-supplied map, reduce, etc. methods.
- Specified by:
run
in class Task
umbilical
- for progress reports
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InterruptedException
Copyright © 2009 The Apache Software Foundation