org.apache.hadoop.examples.dancing
Class DistributedPentomino.PentMap
java.lang.Object
org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
org.apache.hadoop.examples.dancing.DistributedPentomino.PentMap
- Enclosing class:
- DistributedPentomino
public static class DistributedPentomino.PentMap
- extends Mapper<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
Each map takes a line, which represents a prefix move and finds all of
the solutions that start with that prefix. The output is the prefix as
the key and the solution as the value.
Method Summary |
void |
map(org.apache.hadoop.io.WritableComparable<?> key,
org.apache.hadoop.io.Text value,
Mapper.Context context)
Break the prefix string into moves (a sequence of integer row ids that
will be selected for each column in order). |
void |
setup(Mapper.Context context)
Called once at the beginning of the task. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistributedPentomino.PentMap
public DistributedPentomino.PentMap()
map
public void map(org.apache.hadoop.io.WritableComparable<?> key,
org.apache.hadoop.io.Text value,
Mapper.Context context)
throws IOException
- Break the prefix string into moves (a sequence of integer row ids that
will be selected for each column in order). Find all solutions with
that prefix.
- Overrides:
map
in class Mapper<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
- Throws:
IOException
setup
public void setup(Mapper.Context context)
- Description copied from class:
Mapper
- Called once at the beginning of the task.
- Overrides:
setup
in class Mapper<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
Copyright © 2009 The Apache Software Foundation