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,
java.util.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 JobConfigurable
configure
in class MapReduceBase
job
- the configurationpublic void reduce(org.apache.hadoop.io.BooleanWritable isInside, java.util.Iterator<org.apache.hadoop.io.LongWritable> values, OutputCollector<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable> output, Reporter reporter) throws java.io.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
- java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class MapReduceBase
java.io.IOException
Copyright © 2009 The Apache Software Foundation