public static class PiEstimator.PiReducer extends MapReduceBase implements Reducer<BooleanWritable,LongWritable,WritableComparable<?>,Writable>
| 构造器和说明 |
|---|
PiEstimator.PiReducer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Reduce task done, write output to a file.
|
void |
configure(JobConf job)
Store job configuration.
|
void |
reduce(BooleanWritable isInside,
Iterator<LongWritable> values,
OutputCollector<WritableComparable<?>,Writable> output,
Reporter reporter)
Accumulate number of points inside/outside results from the mappers.
|
public void configure(JobConf job)
configure 在接口中 JobConfigurableconfigure 在类中 MapReduceBasejob - the configurationpublic void reduce(BooleanWritable isInside, Iterator<LongWritable> values, OutputCollector<WritableComparable<?>,Writable> output, Reporter reporter) throws IOException
reduce 在接口中 Reducer<BooleanWritable,LongWritable,WritableComparable<?>,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 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 MapReduceBaseIOExceptionCopyright © 2009 The Apache Software Foundation