public static class PiEstimator.PiReducer extends MapReduceBase implements Reducer<org.apache.hadoop.io.BooleanWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
| Constructor and Description |
|---|
PiEstimator.PiReducer() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Reduce task done, write output to a file.
|
void |
configure(JobConf job)
Store job configuration.
|
void |
reduce(org.apache.hadoop.io.BooleanWritable isInside,
Iterator<org.apache.hadoop.io.LongWritable> values,
OutputCollector<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable> output,
Reporter reporter)
Accumulate number of points inside/outside results from the mappers.
|
public void configure(JobConf job)
configure in interface JobConfigurableconfigure in class MapReduceBasejob - the configurationpublic void reduce(org.apache.hadoop.io.BooleanWritable isInside,
Iterator<org.apache.hadoop.io.LongWritable> values,
OutputCollector<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable> output,
Reporter reporter)
throws IOException
reduce in interface Reducer<org.apache.hadoop.io.BooleanWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>isInside - Is the points inside?values - An iterator to a list of point countsoutput - dummy, not used here.reporter - IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class MapReduceBaseIOExceptionCopyright © 2009 The Apache Software Foundation