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 java.math.BigDecimal |
estimate(int numMaps,
long numPoints,
JobConf jobConf)
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 estimate(int numMaps, long numPoints, JobConf jobConf) throws java.io.IOException
java.io.IOException
public int run(java.lang.String[] args) throws java.lang.Exception
run
in interface org.apache.hadoop.util.Tool
java.lang.Exception
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
Copyright © 2009 The Apache Software Foundation