public class GraknSparkMemory extends Object implements org.apache.tinkerpop.gremlin.process.computer.Memory.Admin, Serializable
This is a modified version of Spark Memory. We change its behaviour so it can work with our own graph computer.
| Modifier and Type | Field and Description |
|---|---|
Map<String,org.apache.tinkerpop.gremlin.process.computer.MemoryComputeKey> |
memoryComputeKeys |
| Constructor and Description |
|---|
GraknSparkMemory(org.apache.tinkerpop.gremlin.process.computer.VertexProgram<?> vertexProgram,
Set<org.apache.tinkerpop.gremlin.process.computer.MapReduce> mapReducers,
org.apache.spark.api.java.JavaSparkContext sparkContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String key,
Object value) |
protected void |
broadcastMemory(org.apache.spark.api.java.JavaSparkContext sparkContext) |
protected void |
complete() |
<R> R |
get(String key) |
int |
getIteration() |
long |
getRuntime() |
void |
incrIteration() |
Set<String> |
keys() |
void |
set(String key,
Object value) |
void |
setInExecute(boolean inExecute) |
void |
setIteration(int iteration) |
void |
setRuntime(long runTime) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic GraknSparkMemory(org.apache.tinkerpop.gremlin.process.computer.VertexProgram<?> vertexProgram,
Set<org.apache.tinkerpop.gremlin.process.computer.MapReduce> mapReducers,
org.apache.spark.api.java.JavaSparkContext sparkContext)
public Set<String> keys()
keys in interface org.apache.tinkerpop.gremlin.process.computer.Memorypublic void incrIteration()
incrIteration in interface org.apache.tinkerpop.gremlin.process.computer.Memory.Adminpublic void setIteration(int iteration)
setIteration in interface org.apache.tinkerpop.gremlin.process.computer.Memory.Adminpublic int getIteration()
getIteration in interface org.apache.tinkerpop.gremlin.process.computer.Memorypublic void setRuntime(long runTime)
setRuntime in interface org.apache.tinkerpop.gremlin.process.computer.Memory.Adminpublic long getRuntime()
getRuntime in interface org.apache.tinkerpop.gremlin.process.computer.Memorypublic <R> R get(String key) throws IllegalArgumentException
get in interface org.apache.tinkerpop.gremlin.process.computer.MemoryIllegalArgumentExceptionpublic void add(String key, Object value)
add in interface org.apache.tinkerpop.gremlin.process.computer.Memorypublic void set(String key, Object value)
set in interface org.apache.tinkerpop.gremlin.process.computer.Memoryprotected void complete()
public void setInExecute(boolean inExecute)
protected void broadcastMemory(org.apache.spark.api.java.JavaSparkContext sparkContext)
Copyright © 2018 Grakn Labs Ltd. All rights reserved.