public static class InvertedIndexMapred.InvertedIndexMapper extends org.apache.hadoop.mapred.MapReduceBase implements org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue>
TextInputFormat and FileSplit This class uses the file name obtained from FileSplit as the location of the word, and the value of the LongWritable key of TextInputFormat as the offset of the word in that file.| Constructor and Description |
|---|
InvertedIndexMapred.InvertedIndexMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.hadoop.mapred.JobConf job) |
void |
map(org.apache.hadoop.io.LongWritable keyIn, org.apache.hadoop.io.Text valueIn, org.apache.hadoop.mapred.OutputCollector<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue> collector, org.apache.hadoop.mapred.Reporter reporter) |
public InvertedIndexMapred.InvertedIndexMapper()
public void configure(org.apache.hadoop.mapred.JobConf job)
configure in interface org.apache.hadoop.mapred.JobConfigurableconfigure in class org.apache.hadoop.mapred.MapReduceBase
public void map(org.apache.hadoop.io.LongWritable keyIn,
org.apache.hadoop.io.Text valueIn,
org.apache.hadoop.mapred.OutputCollector<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue> collector,
org.apache.hadoop.mapred.Reporter reporter)
throws java.io.IOException
map in interface org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue>java.io.IOException