org.apache.hadoop.examples
Class PiEstimator.PiMapper

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.hadoop.examples.PiEstimator.PiMapper
All Implemented Interfaces:
Closeable, JobConfigurable, Mapper<LongWritable,Writable,LongWritable,LongWritable>
Enclosing class:
PiEstimator

public static class PiEstimator.PiMapper
extends MapReduceBase
implements Mapper<LongWritable,Writable,LongWritable,LongWritable>

Mappper class for Pi estimation.


Constructor Summary
PiEstimator.PiMapper()
           
 
Method Summary
 void close()
          Default implementation that does nothing.
 void configure(JobConf job)
          Mapper configuration.
 void map(LongWritable key, Writable val, OutputCollector<LongWritable,LongWritable> out, Reporter reporter)
          Map method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PiEstimator.PiMapper

public PiEstimator.PiMapper()
Method Detail

configure

public void configure(JobConf job)
Mapper configuration.

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

map

public void map(LongWritable key,
                Writable val,
                OutputCollector<LongWritable,LongWritable> out,
                Reporter reporter)
         throws IOException
Map method.

Specified by:
map in interface Mapper<LongWritable,Writable,LongWritable,LongWritable>
Parameters:
key -
val - not-used
out -
reporter -
Throws:
IOException

close

public void close()
Description copied from class: MapReduceBase
Default implementation that does nothing.

Specified by:
close in interface Closeable
Overrides:
close in class MapReduceBase


Copyright © 2008 The Apache Software Foundation