public static class QuasiMonteCarlo.QmcReducer
extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.BooleanWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
Constructor and Description |
---|
QuasiMonteCarlo.QmcReducer() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup(org.apache.hadoop.mapreduce.Reducer.Context context)
Reduce task done, write output to a file.
|
void |
reduce(org.apache.hadoop.io.BooleanWritable isInside,
Iterable<org.apache.hadoop.io.LongWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
Accumulate number of points inside/outside results from the mappers.
|
public void reduce(org.apache.hadoop.io.BooleanWritable isInside, Iterable<org.apache.hadoop.io.LongWritable> values, org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException
reduce
in class org.apache.hadoop.mapreduce.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 countscontext
- dummy, not used here.IOException
InterruptedException
public void cleanup(org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException
cleanup
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.BooleanWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.