org.apache.hadoop.examples
Class PiEstimator

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.examples.PiEstimator
All Implemented Interfaces:
Configurable, Tool

public class PiEstimator
extends Configured
implements Tool

A Map-reduce program to estimaate the valu eof Pi using monte-carlo method.


Nested Class Summary
static class PiEstimator.PiMapper
          Mappper class for Pi estimation.
static class PiEstimator.PiReducer
           
 
Constructor Summary
PiEstimator()
           
 
Method Summary
static void main(String[] argv)
           
 int run(String[] args)
          Launches all the tasks in order.
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Constructor Detail

PiEstimator

public PiEstimator()
Method Detail

run

public int run(String[] args)
        throws Exception
Launches all the tasks in order.

Specified by:
run in interface Tool
Parameters:
args - command specific arguments.
Returns:
exit code.
Throws:
Exception

main

public static void main(String[] argv)
                 throws Exception
Throws:
Exception


Copyright © 2008 The Apache Software Foundation