org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Toolpublic class QuasiMonteCarlo
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
| Modifier and Type | Class | Description |
|---|---|---|
static class |
QuasiMonteCarlo.QmcMapper |
Mapper class for Pi estimation.
|
static class |
QuasiMonteCarlo.QmcReducer |
Reducer class for Pi estimation.
|
| Constructor | Description |
|---|---|
QuasiMonteCarlo() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.math.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(java.lang.String[] argv) |
main method for running it as a stand alone command.
|
int |
run(java.lang.String[] args) |
Parse arguments and then runs a map/reduce job.
|
public static java.math.BigDecimal estimatePi(int numMaps,
long numPoints,
org.apache.hadoop.fs.Path tmpDir,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InterruptedExceptionpublic int run(java.lang.String[] args)
throws java.lang.Exception
run in interface org.apache.hadoop.util.Tooljava.lang.Exceptionpublic static void main(java.lang.String[] argv)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.