
public abstract class MapReduce<K,V> extends Object
Abstract MapReduce class.
| Modifier and Type | Field and Description |
|---|---|
protected Map<K,V>[] |
_final |
protected Map<K,List<V>>[][] |
_intermediate |
protected int |
_numMapTasks |
protected int |
_numReduceTasks |
protected Map<K,V> |
_result |
| Constructor and Description |
|---|
MapReduce(int numMapTasks,
int numReduceTasks)
Constructor for MapReduce.
|
| Modifier and Type | Method and Description |
|---|---|
void |
emitFinal(int reduceTaskId,
K key,
V val)
emitFinal.
|
void |
emitIntermediate(int mapTaskId,
K key,
V val)
emitIntermediate.
|
Set<K> |
getKeys()
getKeys.
|
Map<K,V> |
getResult()
getResult.
|
void |
merge()
merge.
|
V |
query(K key)
query.
|
void |
reduce(int reduceTaskId)
reduce.
|
V |
reduce(List<V> vals)
reduce.
|
abstract V |
reduce(V v1,
V v2)
reduce.
|
void |
run()
run.
|
abstract MapTask<K,V> |
splitter(int taskId)
splitter.
|
public MapReduce(int numMapTasks,
int numReduceTasks)
Constructor for MapReduce.
numMapTasks - a int.numReduceTasks - a int.public void emitIntermediate(int mapTaskId,
K key,
V val)
emitIntermediate.
mapTaskId - a int.key - a K object.val - a V object.public void run()
throws SuspendableException
run.
SuspendableExceptionpublic abstract MapTask<K,V> splitter(int taskId)
splitter.
taskId - a int.MapTask object.public void reduce(int reduceTaskId)
reduce.
reduceTaskId - a int.public void merge()
merge.
public void emitFinal(int reduceTaskId,
K key,
V val)
emitFinal.
reduceTaskId - a int.key - a K object.val - a V object.Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.