org.apache.hadoop.mapred
Class ReduceTask
java.lang.Object
org.apache.hadoop.mapred.Task
org.apache.hadoop.mapred.ReduceTask
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.Writable
@InterfaceAudience.Private
@InterfaceStability.Unstable
public class ReduceTask
- extends Task
A Reduce 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, reportFatalError, reportNextRecordRange, runJobCleanupTask, runJobSetupTask, runTaskCleanupTask, setConf, setJobFile, setJobTokenSecret, setJvmContext, setPhase, setSkipping, setSkipRanges, setWriteSkipRecs, statusUpdate, supportIsolationRunner, toString, toWriteSkipRecs, writeFilesRequiredForRerun |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ReduceTask
public ReduceTask()
ReduceTask
public ReduceTask(java.lang.String jobFile,
TaskAttemptID taskId,
int partition,
int numMaps,
int numSlotsRequired)
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
isMapTask
public boolean isMapTask()
- Specified by:
isMapTask
in class Task
getNumMaps
public int getNumMaps()
localizeConfiguration
public void localizeConfiguration(JobConf conf)
throws java.io.IOException
- Localize the given JobConf to be specific for this task.
- Overrides:
localizeConfiguration
in class Task
- 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.InterruptedException,
java.lang.ClassNotFoundException
- 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.InterruptedException
java.lang.ClassNotFoundException
Copyright © 2009 The Apache Software Foundation