Class BottleneckedMapReduceFramework<E,K,V,A,R>
java.lang.Object
mapreduce.framework.bottlenecked.exercise.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 emitted by the mapperV- the value in the key-value pairs emitted by the mapperA- the mutable result container of the reducerR- the final result of the reducer
- 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 reduction
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 reduceAll(Map) methods finish
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
-
Constructor Summary
ConstructorsConstructorDescriptionBottleneckedMapReduceFramework(Mapper<E, K, V> mapper, AccumulatorCombinerReducer<V, A, R> accumulatorCombinerReducer) Constructs a BottleneckedMapReduceFramework using the given mapper and collector. -
Method Summary
-
Constructor Details
-
BottleneckedMapReduceFramework
public BottleneckedMapReduceFramework(Mapper<E, K, V> mapper, AccumulatorCombinerReducer<V, A, R> accumulatorCombinerReducer) Constructs a BottleneckedMapReduceFramework using the given mapper and collector.- Parameters:
mapper- Mapper used to transform input data to key-value pairsaccumulatorCombinerReducer- Reducer used to create mutable containers, accumulate values into those containers, then finally reduce the containers.
-
-
Method Details
-
mapper
-
accumulatorCombinerReducer
- Specified by:
accumulatorCombinerReducerin interfaceMapReduceFramework<E,K, V, A, R>
-
mapReduceAll
- Specified by:
mapReduceAllin interfaceMapReduceFramework<E,K, V, A, R> - Throws:
InterruptedExceptionExecutionException
-