Class BottleneckedMapReduceFramework<E,K,V,A,R>
java.lang.Object
mapreduce.framework.lab.bottlenecked.BottleneckedMapReduceFramework<E,K,V,A,R>
- Type Parameters:
E- the type of element that is originally being inputK- the key in the key-value pairs written by the mapperV- the value in the key-value pairs written by the mapperA- the mutable result container of the collectorR- the final result of the collector
- All Implemented Interfaces:
MapReduceFramework<E,K,V,A,R>
@Immutable
public final class BottleneckedMapReduceFramework<E,K,V,A,R>
extends Object
implements MapReduceFramework<E,K,V,A,R>
A MapReduce framework that separates mapping, accumulating, and finishing
into three separate stages. The
mapAll(Object[]) method calls the
Mapper on everything in the given array in parallel. Then, the
accumulateAll(List[]) method sequentially groups the output of the
mapAll method. Finally, the finishAll(Map) method finishes
off the reduction, going from a map with values of type A to a map with
values of type R.- Author:
- __STUDENT_NAME__, Finn Voichick, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BottleneckedMapReduceFramework
Constructs a BottleneckedMapReduceFramework using the given mapper and collector.- Parameters:
mapper- Mapper used to transform input data to key-value pairscollector- Collector used to create mutable containers, accumulate values into those containers, then finish containers to reduced values.
-
-
Method Details
-
getMapper
-
getCollector
- Specified by:
getCollectorin interfaceMapReduceFramework<E,K,V,A,R>
-
mapReduceAll
- Specified by:
mapReduceAllin interfaceMapReduceFramework<E,K,V,A,R>- Throws:
InterruptedExceptionExecutionException
-