org.apache.nutch.mapReduce
Class MapTask

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

public class MapTask
extends Task

A Map task.


Constructor Summary
MapTask()
           
MapTask(String jobFile, String taskId, FileSplit split)
           
 
Method Summary
 org.apache.nutch.mapReduce.TaskRunner createRunner(TaskTracker tracker)
          Return an approprate thread runner for this task.
 FileSplit getSplit()
           
 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

MapTask

public MapTask()

MapTask

public MapTask(String jobFile,
               String taskId,
               FileSplit split)
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

getSplit

public FileSplit getSplit()

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