org.apache.hadoop.examples.pi
Class DistBbp

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

public final class DistBbp
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

A map/reduce program that uses a BBP-type method to compute exact binary digits of Pi. This program is designed for computing the n th bit of Pi, for large n, say n >= 10^8. For computing lower bits of Pi, consider using bbp. The actually computation is done by DistSum jobs. The steps for launching the jobs are: (1) Initialize parameters. (2) Create a list of sums. (3) Read computed values from the given local directory. (4) Remove the computed values from the sums. (5) Partition the remaining sums into computation jobs. (6) Submit the computation jobs to a cluster and then wait for the results. (7) Write job outputs to the given local directory. (8) Combine the job outputs and print the Pi bits.


Field Summary
static String DESCRIPTION
           
 
Constructor Summary
DistBbp()
           
 
Method Summary
static void main(String[] args)
          main
 int run(String[] args)
          
 
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
 

Field Detail

DESCRIPTION

public static final String DESCRIPTION
See Also:
Constant Field Values
Constructor Detail

DistBbp

public DistBbp()
Method Detail

run

public int run(String[] args)
        throws Exception

Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
main

Throws:
Exception


Copyright © 2009 The Apache Software Foundation