org.apache.nutch.mapReduce
Class ReduceTask

java.lang.Object
  extended byorg.apache.nutch.mapReduce.Task
      extended byorg.apache.nutch.mapReduce.ReduceTask
All Implemented Interfaces:
Writable

public class ReduceTask
extends Task

A Reduce task.


Constructor Summary
ReduceTask()
           
ReduceTask(String jobFile, String taskId, String[] mapTaskIds, int partition)
           
 
Method Summary
 org.apache.nutch.mapReduce.TaskRunner createRunner(TaskTracker tracker)
          Return an approprate thread runner for this task.
 String[] getMapTaskIds()
           
 int getPartition()
           
 void readFields(DataInput in)
          Reads the fields of this object from in.
 void run(JobConf job, TaskUmbilicalProtocol umbilical)
          Run this task as a part of the named job.
 void write(DataOutput out)
          Writes the fields of this object to out.
 
Methods inherited from class org.apache.nutch.mapReduce.Task
getJobFile, getTaskId, setJobFile, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReduceTask

public ReduceTask()

ReduceTask

public ReduceTask(String jobFile,
                  String taskId,
                  String[] mapTaskIds,
                  int partition)
Method Detail

createRunner

public org.apache.nutch.mapReduce.TaskRunner createRunner(TaskTracker tracker)
Description copied from class: Task
Return an approprate thread runner for this task.

Specified by:
createRunner in class Task

getMapTaskIds

public String[] getMapTaskIds()

getPartition

public int getPartition()

write

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Writes the fields of this object to out.

Specified by:
write in interface Writable
Overrides:
write in class Task
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Reads the fields of this object from in. For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Overrides:
readFields in class Task
Throws:
IOException

run

public void run(JobConf job,
                TaskUmbilicalProtocol umbilical)
         throws IOException
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
Parameters:
umbilical - for progress reports
Throws:
IOException


Copyright © 2006 The Apache Software Foundation