org.apache.hadoop.examples.dancing
Class DistributedPentomino.PentMap
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.examples.dancing.DistributedPentomino.PentMap
- All Implemented Interfaces:
- java.io.Closeable, JobConfigurable, Mapper<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
- Enclosing class:
- DistributedPentomino
public static class DistributedPentomino.PentMap
- extends MapReduceBase
- implements 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 |
configure(JobConf conf)
Default implementation that does nothing. |
void |
map(org.apache.hadoop.io.WritableComparable key,
org.apache.hadoop.io.Text value,
OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> output,
Reporter reporter)
Break the prefix string into moves (a sequence of integer row ids that
will be selected for each column in order). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.io.Closeable |
close |
DistributedPentomino.PentMap
public DistributedPentomino.PentMap()
map
public void map(org.apache.hadoop.io.WritableComparable key,
org.apache.hadoop.io.Text value,
OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> output,
Reporter reporter)
throws java.io.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.
- Specified by:
map
in interface Mapper<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
- Parameters:
key
- the input key.value
- the input value.output
- collects mapped keys and values.reporter
- facility to report progress.
- Throws:
java.io.IOException
configure
public void configure(JobConf conf)
- Description copied from class:
MapReduceBase
- Default implementation that does nothing.
- Specified by:
configure
in interface JobConfigurable
- Overrides:
configure
in class MapReduceBase
- Parameters:
conf
- the configuration
Copyright © 2009 The Apache Software Foundation