对gremlin服务器使用gremlin遍历(Tinkergraph)

时间:2022-05-13 04:49:05

Is it possible to use Tinkergraph-Gremlin against a local instance of the gremlin-server? In other words, what's missing from the following source code to make it query the localhost:8182 gremlin-server instead of the in-memory DB:

是否可以使用Tinkergraph-Gremlin对抗gremlin-server的本地实例?换句话说,以下源代码中缺少什么使它查询localhost:8182 gremlin-server而不是内存中的DB:

Graph graph = TinkerGraph.open();
GraphTraversalSource g = graph.traversal();

1 个解决方案

#1


2  

Sounds like you want to use a remote traversal.

听起来你想要使用远程遍历。

EmptyGraph graph = EmptyGraph.instance();
GraphTraversalSource g = graph.traversal().withRemote("conf/remote-graph.properties");

Check out the TinkerPop documentation for Connecting via withRemote().

查看通过withRemote()连接的TinkerPop文档。

#1


2  

Sounds like you want to use a remote traversal.

听起来你想要使用远程遍历。

EmptyGraph graph = EmptyGraph.instance();
GraphTraversalSource g = graph.traversal().withRemote("conf/remote-graph.properties");

Check out the TinkerPop documentation for Connecting via withRemote().

查看通过withRemote()连接的TinkerPop文档。