org.apache.hadoop.examples
Class NNBench
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.examples.NNBench
- All Implemented Interfaces:
- Closeable, JobConfigurable, Reducer
public class NNBench
- extends MapReduceBase
- implements Reducer
This program uses map/reduce to just run a distributed job where there is
no interaction between the tasks and each task creates 1M/NTasks files
of 8 bytes each, closes them. Opens those files again, and reads them,
and closes them. It is meant as a stress-test and benchmark for namenode.
- Author:
- Owen O'Malley
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NNBench
public NNBench()
reduce
public void reduce(WritableComparable key,
Iterator values,
OutputCollector output,
Reporter reporter)
throws IOException
- Description copied from interface:
Reducer
- Combines values for a given key. Output values must be of the same type
as input values. Input keys must not be altered. Typically all values
are combined into zero or one value. Output pairs are collected with
calls to
OutputCollector.collect(WritableComparable,Writable)
.
- Specified by:
reduce
in interface Reducer
- Parameters:
key
- the keyvalues
- the values to combineoutput
- to collect combined values
- Throws:
IOException
main
public static void main(String[] args)
throws IOException
- This is the main routine for launching a distributed namenode stress test.
It runs 10 maps/node and each node creates 1M/nMaps DFS files.
The reduce doesn't do anything.
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation