public final class StoreMapReduce extends java.lang.Object implements MapReduce<MapReduce.NullObject,java.lang.Object,MapReduce.NullObject,java.lang.Object,java.util.Collection>
MapReduce.MapEmitter<K,V>, MapReduce.NullObject, MapReduce.ReduceEmitter<OK,OV>, MapReduce.Stage| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
STORE_STEP_SIDE_EFFECT_KEY |
MAP_REDUCE| Constructor and Description |
|---|
StoreMapReduce(StoreStep step) |
| Modifier and Type | Method and Description |
|---|---|
StoreMapReduce |
clone()
When multiple workers on a single machine need MapReduce instances, it is possible to use clone.
|
boolean |
doStage(MapReduce.Stage stage)
A MapReduce job can be map-only, map-reduce-only, or map-combine-reduce.
|
boolean |
equals(java.lang.Object object) |
java.util.Collection |
generateFinalResult(java.util.Iterator<KeyValue<MapReduce.NullObject,java.lang.Object>> 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.
|
java.lang.String |
getMemoryKey()
The results of the MapReduce job are associated with a memory-key to ultimately be stored in
Memory. |
int |
hashCode() |
void |
loadState(org.apache.commons.configuration.Configuration configuration)
When it is necessary to load the state of a MapReduce job, this method is called.
|
void |
map(Vertex vertex,
MapReduce.MapEmitter<MapReduce.NullObject,java.lang.Object> emitter)
The map() method is logically executed at all vertices in the graph in parallel.
|
void |
storeState(org.apache.commons.configuration.Configuration configuration)
When it is necessary to store the state of a MapReduce job, this method is called.
|
java.lang.String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, waitaddResultToMemory, combine, createMapReduce, getMapKeySort, getReduceKeySort, reducepublic static final java.lang.String STORE_STEP_SIDE_EFFECT_KEY
public StoreMapReduce(StoreStep step)
public void storeState(org.apache.commons.configuration.Configuration configuration)
MapReducestoreState in interface MapReduce<MapReduce.NullObject,java.lang.Object,MapReduce.NullObject,java.lang.Object,java.util.Collection>configuration - the configuration to store the state of the MapReduce job in.public void loadState(org.apache.commons.configuration.Configuration configuration)
MapReduceloadState in interface MapReduce<MapReduce.NullObject,java.lang.Object,MapReduce.NullObject,java.lang.Object,java.util.Collection>configuration - the configuration to load the state of the MapReduce job from.public boolean doStage(MapReduce.Stage stage)
MapReducedoStage in interface MapReduce<MapReduce.NullObject,java.lang.Object,MapReduce.NullObject,java.lang.Object,java.util.Collection>stage - the stage to check for definition.public void map(Vertex vertex, MapReduce.MapEmitter<MapReduce.NullObject,java.lang.Object> emitter)
MapReducemap in interface MapReduce<MapReduce.NullObject,java.lang.Object,MapReduce.NullObject,java.lang.Object,java.util.Collection>vertex - the current vertex being map() processed.emitter - the component that allows for key/value pairs to be emitted to the next stage.public java.util.Collection generateFinalResult(java.util.Iterator<KeyValue<MapReduce.NullObject,java.lang.Object>> keyValues)
MapReducegenerateFinalResult in interface MapReduce<MapReduce.NullObject,java.lang.Object,MapReduce.NullObject,java.lang.Object,java.util.Collection>keyValues - the key/value pairs that were emitted from reduce() (or map() in a map-only job)public java.lang.String getMemoryKey()
MapReduceMemory.getMemoryKey in interface MapReduce<MapReduce.NullObject,java.lang.Object,MapReduce.NullObject,java.lang.Object,java.util.Collection>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic StoreMapReduce clone() throws java.lang.CloneNotSupportedException
MapReduceMapReduce.storeState(org.apache.commons.configuration.Configuration) and MapReduce.loadState(org.apache.commons.configuration.Configuration) model.
The default implementation simply returns the object as it assumes that the MapReduce instance is a stateless singleton.clone in interface MapReduce<MapReduce.NullObject,java.lang.Object,MapReduce.NullObject,java.lang.Object,java.util.Collection>clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionCopyright © 2013-2015 TinkerPop. All Rights Reserved.