public static class GraphComputerTest.MapReduceC extends StaticMapReduce<MapReduce.NullObject,MapReduce.NullObject,MapReduce.NullObject,MapReduce.NullObject,MapReduce.NullObject>
MapReduce.MapEmitter<K,V>, MapReduce.NullObject, MapReduce.ReduceEmitter<OK,OV>, MapReduce.Stage
MAP_REDUCE
Constructor and Description |
---|
MapReduceC() |
Modifier and Type | Method and Description |
---|---|
boolean |
doStage(MapReduce.Stage stage)
A MapReduce job can be map-only, map-reduce-only, or map-combine-reduce.
|
MapReduce.NullObject |
generateFinalResult(Iterator<KeyValue<MapReduce.NullObject,MapReduce.NullObject>> keyValues)
The key/value pairs emitted by reduce() (or map() in a map-only job) can be iterated to generate a local JVM Java object.
|
String |
getMemoryKey()
The results of the MapReduce job are associated with a memory-key to ultimately be stored in
Memory . |
void |
map(Vertex vertex,
MapReduce.MapEmitter<MapReduce.NullObject,MapReduce.NullObject> emitter)
The map() method is logically executed at all vertices in the graph in parallel.
|
clone, equals, hashCode, storeState, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
addResultToMemory, combine, createMapReduce, getMapKeySort, getReduceKeySort, loadState, reduce, workerEnd, workerStart
public boolean doStage(MapReduce.Stage stage)
MapReduce
stage
- the stage to check for definition.public void map(Vertex vertex, MapReduce.MapEmitter<MapReduce.NullObject,MapReduce.NullObject> emitter)
MapReduce
MapReduce
classes must at least provide an implementation of MapReduce#map(Vertex, MapEmitter)
.vertex
- the current vertex being map() processed.emitter
- the component that allows for key/value pairs to be emitted to the next stage.public String getMemoryKey()
MapReduce
Memory
.public MapReduce.NullObject generateFinalResult(Iterator<KeyValue<MapReduce.NullObject,MapReduce.NullObject>> keyValues)
MapReduce
keyValues
- the key/value pairs that were emitted from reduce() (or map() in a map-only job)Copyright © 2013–2016 Apache Software Foundation. All rights reserved.