## org.apache.hadoop.examples.dancing
Class DistributedPentomino

    java.lang.Object
      org.apache.hadoop.conf.Configured
          org.apache.hadoop.examples.dancing.DistributedPentomino

All Implemented Interfaces:
  Configurable, Tool

    public class DistributedPentomino

extends Configured
implements Tool

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.
`int` `run(String[] args)` Execute the command with the given arguments.

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

### DistributedPentomino

    public DistributedPentomino()

Method Detail

### main

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

  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:
    `Exception`

### run

    public int run(String[] args)
            throws Exception

  Description copied from interface: `Tool`
  Execute the command with the given arguments.

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

Copyright © 2009 The Apache Software Foundation