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_COMBINE_RECORDS_BEFORE_PROGRESS, extraData, failedShuffleCounter, FILESYSTEM_COUNTER_GROUP, gcUpdater, jobCleanup, jobContext, jobRunStateForCleanup, jobSetup, lDirAlloc, mapOutputFile, MERGED_OUTPUT_PREFIX, mergedMapOutputsCounter, outputFormat, PROGRESS_INTERVAL, spilledRecordsCounter, taskCleanup, taskContext, tokenSecret, umbilical |
Methods inherited from class org.apache.hadoop.mapred.Task |
createReduceContext, done, getConf, getFileSystemCounterNames, getFsStatistics, getJobFile, getJobID, getJobTokenSecret, getMapOutputFile, getNumSlotsRequired, getPartition, getPhase, getProgress, getSkipRanges, getTaskID, initialize, isSkipping, keepTaskFiles, reportFatalError, reportNextRecordRange, runJobCleanupTask, runJobSetupTask, runTaskCleanupTask, setConf, setJobFile, setJobTokenSecret, setPhase, setSkipping, setSkipRanges, setWriteSkipRecs, statusUpdate, toString, toWriteSkipRecs |
ReduceTask
public ReduceTask()
ReduceTask
public ReduceTask(String jobFile,
TaskAttemptID taskId,
int partition,
int numMaps,
int numSlotsRequired)
isMapTask
public boolean isMapTask()
- Specified by:
isMapTask
in class Task
getNumMaps
public int getNumMaps()
localizeConfiguration
public void localizeConfiguration(JobConf conf)
throws IOException
- Localize the given JobConf to be specific for this task.
- Overrides:
localizeConfiguration
in class Task
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Overrides:
write
in class Task
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Overrides:
readFields
in class Task
- Throws:
IOException
run
public void run(JobConf job,
TaskUmbilicalProtocol umbilical)
throws IOException,
InterruptedException,
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:
IOException
InterruptedException
ClassNotFoundException
Copyright © 2012 Apache Software Foundation. All Rights Reserved.