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

Use gremlin traversals (Tinkergraph) against the gremlin server

是否可以针对 gremlin 服务器的本地实例使用 Tinkergraph-Gremlin? 换句话说,以下源代码缺少什么使其查询 localhost:8182 gremlin-server 而不是内存数据库:

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

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

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

查看 Connecting via withRemote() 的 TinkerPop 文档。