Package mapreduce.framework.lab.matrix
Class MatrixMapReduceFramework<E,K,V,A,R>
java.lang.Object
mapreduce.framework.lab.matrix.MatrixMapReduceFramework<E,K,V,A,R>
- All Implemented Interfaces:
MapReduceFramework<E,K,V,A,R>
@Immutable
public class MatrixMapReduceFramework<E,K,V,A,R>
extends Object
implements MapReduceFramework<E,K,V,A,R>
A MapReduce framework that uses a matrix to organize its keys and associated
mutable containers of values. Unlike the BottleneckedMapReduceFramework, this
class does not require the accumulation stage to run sequentially. It gets
around the issue by creating a whole matrix of
Maps, where each row
is assigned to a map task, and each column is later assigned to a reduce
task.
The mapAndAccumulateAll(Object[]) method slices up the input and
maps each slice to one row, accumulating as it goes. It places items into the
correct column based on the HashUtils.toIndex(Object, int) method.
Then, the combineAndFinishAll(Map[][]) method combines the mutable
result containers from the various map tasks, and finishes them to the
reduced values.- Author:
- __STUDENT_NAME__, Finn Voichick, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MatrixMapReduceFramework
-
MatrixMapReduceFramework
-
-
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
-