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..


Method Summary
 void map(WritableComparable key, Writable value, OutputCollector output, Reporter reporter)
          Maps a single input key/value pair into intermediate key/value pairs.
 
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable
configure
 
Methods inherited from interface org.apache.hadoop.io.Closeable
close
 

Method Detail

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 key
value - the values
output - collects mapped keys and values
Throws:
IOException


Copyright © 2006 The Apache Software Foundation