This would be much easier if there were a more recent releases of Titan and DynamoDB-Titan Storage, but it can still be done.
I've posted previously directions on how to build the titan11 with an update to TinkerPop 3.2.x -- currently at TP 3.2.3, thanks to solid contributions from
@dylanht and
@sjudeng --
https://groups.google.com/d/msg/gremlin-users/ajs0C4-0vzY/SEIDhczrAgAJNext if you want to use the DynamoDB backend, you need to make a few changes in your
dynamodb-titan-storage-backend repo before building it with mvn install so that it uses the locally-built Titan snapshot.
The patch updates the TinkerPop and Titan version and updates the Gremlin Server configs:
Then before starting the Gremlin Server in step 7, make sure to install the gremlin-python plugin on the server:
src/test/resources/install-gremlin-server.sh
cd server/dynamodb-titan100-storage-backend-1.0.0-hadoop1
bin/gremlin-server.sh -i org.apache.tinkerpop gremlin-python 3.2.3
bin/gremlin-server.sh conf/gremlin-server/gremlin-server-local.yaml
Load the Marvel test data using Gremlin Console:
bin/gremlin.sh
gremlin> :remote connect tinkerpop.server conf/remote.yaml
gremlin> :> com.amazon.titan.example.MarvelGraphFactory.load(graph, 100, false)
Finally use the Python REPL to query the Gremlin Server
python
>>> from gremlin_python import statics
>>> from gremlin_python.structure.graph import Graph
>>> from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
>>> statics.load_statics(globals())
>>> graph = Graph()
>>> g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
>>> g.V().has('weapon', 'claws').valueMap().toList()
Here is the
tutorial link for Python + Gremlin Server.
-- Jason