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

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.hadoop.examples.dancing.DistributedPentomino.PentMap
All Implemented Interfaces:
Closeable, JobConfigurable, Mapper<WritableComparable,Text,Text,Text>
Enclosing class:
DistributedPentomino

public static class DistributedPentomino.PentMap
extends MapReduceBase
implements Mapper<WritableComparable,Text,Text,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.


Constructor Summary
DistributedPentomino.PentMap()
           
 
Method Summary
 void configure(JobConf conf)
          Default implementation that does nothing.
 void map(WritableComparable key, Text value, OutputCollector<Text,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 org.apache.hadoop.mapred.MapReduceBase
close
 
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
 

Constructor Detail

DistributedPentomino.PentMap

public DistributedPentomino.PentMap()
Method Detail

map

public void map(WritableComparable key,
                Text value,
                OutputCollector<Text,Text> output,
                Reporter reporter)
         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.

Specified by:
map in interface Mapper<WritableComparable,Text,Text,Text>
Parameters:
key - the input key.
value - the input value.
output - collects mapped keys and values.
reporter - facility to report progress.
Throws:
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