org.apache.hadoop.examples
Class RandomWriter.Map

java.lang.Object
  extended byorg.apache.hadoop.mapred.MapReduceBase
      extended byorg.apache.hadoop.examples.RandomWriter.Map
All Implemented Interfaces:
Closeable, JobConfigurable, Mapper
Enclosing class:
RandomWriter

public static class RandomWriter.Map
extends MapReduceBase
implements Mapper


Constructor Summary
RandomWriter.Map()
           
 
Method Summary
 void configure(JobConf job)
          Save the values out of the configuaration that we need to write the data.
 void map(WritableComparable key, Writable value, OutputCollector output, Reporter reporter)
          Given an output filename, write a bunch of random records to it.
 
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.io.Closeable
close
 

Constructor Detail

RandomWriter.Map

public RandomWriter.Map()
Method Detail

map

public void map(WritableComparable key,
                Writable value,
                OutputCollector output,
                Reporter reporter)
         throws IOException
Given an output filename, write a bunch of random records to it.

Specified by:
map in interface Mapper
Parameters:
key - the key
value - the values
output - collects mapped keys and values
Throws:
IOException

configure

public void configure(JobConf job)
Save the values out of the configuaration that we need to write the data.

Specified by:
configure in interface JobConfigurable
Overrides:
configure in class MapReduceBase


Copyright © 2006 The Apache Software Foundation