org.apache.hadoop.examples.dancing
Class DistributedPentomino

java.lang.Object
  extended by org.apache.hadoop.examples.dancing.DistributedPentomino

public class DistributedPentomino
extends Object

Launch a distributed pentomino solver. It generates a complete list of prefixes of length N with each unique prefix as a separate line. A prefix is a sequence of N integers that denote the index of the row that is choosen for each column in order. Note that the next column is heuristically choosen by the solver, so it is dependant on the previous choice. That file is given as the input to map/reduce. The output key/value are the move prefix/solution as Text/Text.


Nested Class Summary
static class DistributedPentomino.PentMap
          Each map takes a line, which represents a prefix move and finds all of the solutions that start with that prefix.
 
Constructor Summary
DistributedPentomino()
           
 
Method Summary
static void main(String[] args)
          Launch the solver on 9x10 board and the one sided pentominos.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedPentomino

public DistributedPentomino()
Method Detail

main

public static void main(String[] args)
                 throws IOException
Launch the solver on 9x10 board and the one sided pentominos. This takes about 2.5 hours on 20 nodes with 2 cpus/node. Splits the job into 2000 maps and 1 reduce.

Throws:
IOException


Copyright © 2006 The Apache Software Foundation