org.htuple.examples
Class SecondarySort.Map

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,Tuple,org.apache.hadoop.io.Text>
      extended by org.htuple.examples.SecondarySort.Map
Enclosing class:
SecondarySort

public static class SecondarySort.Map
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,Tuple,org.apache.hadoop.io.Text>

This map class simply tokenizes each input line, and emits a (tuple, line) pair, where the tuple contains the last and first name.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
SecondarySort.Map()
           
 
Method Summary
protected  void map(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text value, org.apache.hadoop.mapreduce.Mapper.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecondarySort.Map

public SecondarySort.Map()
Method Detail

map

protected void map(org.apache.hadoop.io.LongWritable key,
                   org.apache.hadoop.io.Text value,
                   org.apache.hadoop.mapreduce.Mapper.Context context)
            throws IOException,
                   InterruptedException
Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,Tuple,org.apache.hadoop.io.Text>
Throws:
IOException
InterruptedException


Copyright © 2013. All Rights Reserved.