public class PiEstimator
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
| Modifier and Type | Class and Description |
|---|---|
static class |
PiEstimator.PiMapper
Mapper class for Pi estimation.
|
static class |
PiEstimator.PiReducer
Reducer class for Pi estimation.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PRECISION |
| Constructor and Description |
|---|
PiEstimator() |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal |
estimate(int numMaps,
long numPoints,
JobConf jobConf)
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 estimate(int numMaps, long numPoints, JobConf jobConf) throws IOException
IOExceptionpublic int run(String[] args) throws Exception
run in interface org.apache.hadoop.util.ToolExceptionCopyright © 2009 The Apache Software Foundation