public class DegreeDistributionMapReduce extends GraknMapReduce<Set<String>>
It returns a map, the key being the degree, the value being a vertex id set containing all the vertices with the given degree.
org.apache.tinkerpop.gremlin.process.computer.MapReduce.MapEmitter<K,V>, org.apache.tinkerpop.gremlin.process.computer.MapReduce.NullObject, org.apache.tinkerpop.gremlin.process.computer.MapReduce.ReduceEmitter<OK,OV>, org.apache.tinkerpop.gremlin.process.computer.MapReduce.Stage| Constructor and Description |
|---|
DegreeDistributionMapReduce() |
DegreeDistributionMapReduce(Set<LabelId> selectedLabelIds,
String degreePropertyKey) |
| Modifier and Type | Method and Description |
|---|---|
Map<Serializable,Set<String>> |
generateFinalResult(Iterator<org.apache.tinkerpop.gremlin.process.computer.KeyValue<Serializable,Set<String>>> keyValues) |
void |
safeMap(org.apache.tinkerpop.gremlin.structure.Vertex vertex,
org.apache.tinkerpop.gremlin.process.computer.MapReduce.MapEmitter<Serializable,Set<String>> emitter)
An alternative to the execute method when ghost vertices are an issue.
|
clone, combine, doStage, getMemoryKey, map, reduce, storeStateloadState, toStringpublic void safeMap(org.apache.tinkerpop.gremlin.structure.Vertex vertex,
org.apache.tinkerpop.gremlin.process.computer.MapReduce.MapEmitter<Serializable,Set<String>> emitter)
GraknMapReducevertex - a vertex that may be a ghostemitter - Tinker emitter objectpublic Map<Serializable,Set<String>> generateFinalResult(Iterator<org.apache.tinkerpop.gremlin.process.computer.KeyValue<Serializable,Set<String>>> keyValues)
generateFinalResult in interface org.apache.tinkerpop.gremlin.process.computer.MapReduce<Serializable,Set<String>,Serializable,Set<String>,Map<Serializable,Set<String>>>generateFinalResult in class GraknMapReduce<Set<String>>Copyright © 2017 Grakn Labs Ltd. All rights reserved.