org.apache.hadoop.examples
Class RandomWriter.Map
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.examples.RandomWriter.Map
- All Implemented Interfaces:
- Closeable, JobConfigurable, Mapper
- Enclosing class:
- RandomWriter
- public static class RandomWriter.Map
- extends MapReduceBase
- implements Mapper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomWriter.Map
public RandomWriter.Map()
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 keyvalue
- the valuesoutput
- 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