net.nutch.mapReduce
Class MapReduceJob

java.lang.Object
  extended bynet.nutch.mapReduce.MapReduceJob

public class MapReduceJob
extends Object

Specifies a map/reduce job. This names the Mapper, combiner (if any), Partitioner, Reducer, InputFormat, and OutputFormat implementations to be used. It also indicates the set of input files, and where the output files should be written.


Constructor Summary
MapReduceJob(File inputBase, String inputFormat, File outputBase, String outputFormat)
          Constructs a map/reduce job.
 
Method Summary
 void setCombiner(Class combinerClass)
          Set the combiner class, if any, to a Reducer.
 void setMapper(Class mapperClass)
          Set the Mapper class.
 void setNumMapTasks(int numMapTasks)
          Set the desired number of map tasks to be executed.
 void setNumReduceTasks(int numReduceTasks)
          Set the desired number of reduce tasks to be executed.
 void setPartitioner(Class partitionerClass)
          Set the Partitioner class.
 void setReducer(Class reducerClass)
          Set the Reducer class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapReduceJob

public MapReduceJob(File inputBase,
                    String inputFormat,
                    File outputBase,
                    String outputFormat)
             throws IOException
Constructs a map/reduce job.

Parameters:
inputBase - the base name for input file enumeration
inputFormat - the name of the input file format
outputBase - the base name for output file name generation
outputFormat - the name of the output file format
Method Detail

setMapper

public void setMapper(Class mapperClass)
Set the Mapper class.


setReducer

public void setReducer(Class reducerClass)
Set the Reducer class.


setPartitioner

public void setPartitioner(Class partitionerClass)
Set the Partitioner class.


setCombiner

public void setCombiner(Class combinerClass)
Set the combiner class, if any, to a Reducer. A combiner can be specified to optimize the system. This is appropriate when the Reducer is commutative and associative. The combiner is used to partially reduce intermediate values prior to invoking the Reducer.


setNumMapTasks

public void setNumMapTasks(int numMapTasks)
Set the desired number of map tasks to be executed.


setNumReduceTasks

public void setNumReduceTasks(int numReduceTasks)
Set the desired number of reduce tasks to be executed.



Copyright © 2005 The Nutch Organization.