org.apache.hadoop.examples.terasort
Class TeraGen.SortGenMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
      extended by org.apache.hadoop.examples.terasort.TeraGen.SortGenMapper
Enclosing class:
TeraGen

public static class TeraGen.SortGenMapper
extends Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

The Mapper class that given a row number, will generate the appropriate output line.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
Mapper.Context
 
Constructor Summary
TeraGen.SortGenMapper()
           
 
Method Summary
 void cleanup(Mapper.Context context)
          Called once at the end of the task.
 void map(org.apache.hadoop.io.LongWritable row, org.apache.hadoop.io.NullWritable ignored, Mapper.Context context)
          Called once for each key/value pair in the input split.
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeraGen.SortGenMapper

public TeraGen.SortGenMapper()
Method Detail

map

public void map(org.apache.hadoop.io.LongWritable row,
                org.apache.hadoop.io.NullWritable ignored,
                Mapper.Context context)
         throws IOException,
                InterruptedException
Description copied from class: Mapper
Called once for each key/value pair in the input split. Most applications should override this, but the default is the identity function.

Overrides:
map in class Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
Throws:
IOException
InterruptedException

cleanup

public void cleanup(Mapper.Context context)
Description copied from class: Mapper
Called once at the end of the task.

Overrides:
cleanup in class Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>


Copyright © 2009 The Apache Software Foundation