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
在接口中 JobConfigurable
configure
在类中 MapReduceBase
job
- 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
- IOException
public void close() throws IOException
close
在接口中 Closeable
close
在接口中 AutoCloseable
close
在类中 MapReduceBase
IOException
Copyright © 2009 The Apache Software Foundation