public class QuasiMonteCarlo
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
| Modifier and Type | Class and Description |
|---|---|
static class |
QuasiMonteCarlo.QmcMapper
Mapper class for Pi estimation.
|
static class |
QuasiMonteCarlo.QmcReducer
Reducer class for Pi estimation.
|
| Constructor and Description |
|---|
QuasiMonteCarlo() |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal |
estimatePi(int numMaps,
long numPoints,
org.apache.hadoop.fs.Path tmpDir,
org.apache.hadoop.conf.Configuration conf)
Run a map/reduce job for estimating Pi.
|
static void |
main(String[] argv)
main method for running it as a stand alone command.
|
int |
run(String[] args)
Parse arguments and then runs a map/reduce job.
|
public static BigDecimal estimatePi(int numMaps, long numPoints, org.apache.hadoop.fs.Path tmpDir, org.apache.hadoop.conf.Configuration conf) throws IOException, ClassNotFoundException, InterruptedException
IOExceptionClassNotFoundExceptionInterruptedExceptionpublic int run(String[] args) throws Exception
run in interface org.apache.hadoop.util.ToolExceptionCopyright © 2008–2020 Apache Software Foundation. All rights reserved.