org.apache.hadoop.mapred
Class MapRunner<K1,V1,K2,V2>

java.lang.Object
  extended by org.apache.hadoop.mapred.MapRunner<K1,V1,K2,V2>
All Implemented Interfaces:
JobConfigurable, MapRunnable<K1,V1,K2,V2>

@InterfaceAudience.Public
@InterfaceStability.Stable
public class MapRunner<K1,V1,K2,V2>
extends Object
implements MapRunnable<K1,V1,K2,V2>

Default MapRunnable implementation.


Constructor Summary
MapRunner()
           
 
Method Summary
 void configure(JobConf job)
          Initializes a new instance from a JobConf.
protected  Mapper<K1,V1,K2,V2> getMapper()
           
 void run(RecordReader<K1,V1> input, OutputCollector<K2,V2> output, Reporter reporter)
          Start mapping input <key, value> pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapRunner

public MapRunner()
Method Detail

configure

public void configure(JobConf job)
Description copied from interface: JobConfigurable
Initializes a new instance from a JobConf.

Specified by:
configure in interface JobConfigurable
Parameters:
job - the configuration

run

public void run(RecordReader<K1,V1> input,
                OutputCollector<K2,V2> output,
                Reporter reporter)
         throws IOException
Description copied from interface: MapRunnable
Start mapping input <key, value> pairs.

Mapping of input records to output records is complete when this method returns.

Specified by:
run in interface MapRunnable<K1,V1,K2,V2>
Parameters:
input - the RecordReader to read the input records.
output - the OutputCollector to collect the outputrecords.
reporter - Reporter to report progress, status-updates etc.
Throws:
IOException

getMapper

protected Mapper<K1,V1,K2,V2> getMapper()


Copyright © 2014 Apache Software Foundation. All Rights Reserved.