Hey instead of using aws web I am using its local available database and creating a graph in the gremlin console
My PC is using Gremlin-version=3.0.1.incubating
and Titan-version=1.0.0
My question: How to save a graph in my local DynamoDB so that i can retrieve it back whenever i wish (after pc restart).
I have tried as many and give a lot time by using save()
or commit()
graph
but in order that i always have error
g.commit()
No signature of method: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource.commit() is applicable for argument types: () values: []
Possible solutions: wait(), computer(), collect(), wait(long), computer(java.lang.Class), collect(groovy.lang.Closure)
I am using tinkerpop 3
, please help.
Thank You.
You are attempting to commit your traversal
g
. You should be attempting to commit your graph like so:graph.commit()
.g
is the traversal which is initialised as such:g = graph.traversal()
and it cannot be committed.Relevant documentation links:
As Filipe mentioned,
g.commit()
throws an exception because there is nocommit()
method ong
which is aGraphTraversalSource
. I suggested that you usegraph.tx().commit()
, wheregraph.tx()
gets theTransaction
from theGraph
. In the comments we found out that you were trying tocommit()
a transaction on aTinkerGraph
, which does not support transactions.You need to instantiate a
TitanGraph
, not aTinkerGraph
. This commonly done with a properties file, and there is a DynamoDB Local example properties file in thedynamodb-titan-storage-backend
repository. Make sure to update thestorage.dynamodb.client.endpoint
to match your configuration. If you are using the Titan Server directions from the DynamoDB-Titan link, the port is4567
. If you are using the directions from the DynamoDB local link above, the default port is8000
.Also note, the DynamoDB-Titan directions end up starting an in-memory DynamoDB Local instance. This behavior can be changed by commenting out the
-inMemory
argument thepom.xml
.