org.apache.hadoop.mapred
Interface Mapper
- All Superinterfaces:
- Closeable, JobConfigurable
- All Known Implementing Classes:
- CopyFiles.FSCopyFilesMapper, CopyFiles.HTTPCopyFilesMapper, DataJoinMapperBase, DataJoinReducerBase, FieldSelectionMapReduce, IdentityMapper, InverseMapper, JobBase, Logalyzer.LogRegexMapper, PiEstimator.PiMapper, PipeMapper, RegexMapper, TokenCountMapper, ValueAggregatorCombiner, ValueAggregatorJobBase, ValueAggregatorMapper, ValueAggregatorReducer, WordCount.MapClass
public interface Mapper
- extends JobConfigurable, Closeable
Maps input key/value pairs to a set of intermediate key/value pairs. All
intermediate values associated with a given output key are subsequently
grouped by the map/reduce system, and passed to a Reducer
to
determine the final output..
map
void map(WritableComparable key,
Writable value,
OutputCollector output,
Reporter reporter)
throws IOException
- Maps a single input key/value pair into intermediate key/value pairs.
Output pairs need not be of the same types as input pairs. A given input
pair may map to zero or many output pairs. Output pairs are collected
with calls to
OutputCollector.collect(WritableComparable,Writable)
.
- Parameters:
key
- the keyvalue
- the valuesoutput
- collects mapped keys and values
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation