edu.purdue.cs.eblanton
Class CounterReduce
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
edu.purdue.cs.eblanton.CounterReduce
- All Implemented Interfaces:
- java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.IntWritable>
public class CounterReduce
- extends org.apache.hadoop.mapred.MapReduceBase
- implements org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.IntWritable>
CounterReduce implements a reduction which accepts any
WritableComparable object and a vector of IntWritable occurrence
counts, and sums these counts.
- See Also:
MapReduceBase,
Reducer
|
Method Summary |
void |
reduce(org.apache.hadoop.io.WritableComparable key,
java.util.Iterator<org.apache.hadoop.io.IntWritable> values,
org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.IntWritable> output,
org.apache.hadoop.mapred.Reporter reporter)
Implements the CounterReduce reduction operation. |
| Methods inherited from class org.apache.hadoop.mapred.MapReduceBase |
close, configure |
| 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.mapred.JobConfigurable |
configure |
| Methods inherited from interface java.io.Closeable |
close |
CounterReduce
public CounterReduce()
reduce
public void reduce(org.apache.hadoop.io.WritableComparable key,
java.util.Iterator<org.apache.hadoop.io.IntWritable> values,
org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.IntWritable> output,
org.apache.hadoop.mapred.Reporter reporter)
throws java.io.IOException
- Implements the CounterReduce reduction operation.
- Specified by:
reduce in interface org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.IntWritable>
- Parameters:
key - the WritableComparable object being countedvalues - iterator over counts provided by the Map operationoutput - the output collector for the resulting sumreporter - ignored
- Throws:
java.io.IOException