|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.examples.PiEstimator.PiMapper
public static class PiEstimator.PiMapper
Mapper class for Pi estimation. Generate points in a unit square and then count points inside/outside of the inscribed circle of the square.
Constructor Summary | |
---|---|
PiEstimator.PiMapper()
|
Method Summary | |
---|---|
void |
map(LongWritable offset,
LongWritable size,
OutputCollector<BooleanWritable,LongWritable> out,
Reporter reporter)
Map method. |
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase |
---|
close, configure |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable |
---|
configure |
Methods inherited from interface java.io.Closeable |
---|
close |
Constructor Detail |
---|
public PiEstimator.PiMapper()
Method Detail |
---|
public void map(LongWritable offset, LongWritable size, OutputCollector<BooleanWritable,LongWritable> out, Reporter reporter) throws java.io.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
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |