public static class PiEstimator.PiMapper extends MapReduceBase implements Mapper<LongWritable,LongWritable,BooleanWritable,LongWritable>
Constructor and Description |
---|
PiMapper() |
Modifier and Type | Method and Description |
---|---|
void |
map(LongWritable offset,
LongWritable size,
OutputCollector<BooleanWritable,LongWritable> out,
Reporter reporter)
Map method.
|
close, configure
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure
public void map(LongWritable offset, LongWritable size, OutputCollector<BooleanWritable,LongWritable> out, Reporter reporter) throws IOException
map
in interface Mapper<LongWritable,LongWritable,BooleanWritable,LongWritable>
offset
- samples starting from the (offset+1)th sample.size
- the number of samples for this mapout
- output {ture->numInside, false->numOutside}reporter
- IOException
Copyright © 2010 The Apache Software Foundation