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

标签 java gremlin tinkerpop3

是否可以针对 gremlin-server 的本地实例使用 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 文档.

关于java - 对 gremlin 服务器使用 gremlin 遍历 (Tinkergraph),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44376835/

相关文章:

指定类的 java.lang.ClassNotFoundException

c# - ExRam Gremlinq 无法与 Cosmos DB 配合使用

scala - 在 titan + cassandra DB 中使用 gremlin scala 更新边缘属性值

java - 迭代ArrayList时如何抓取对象方法?

java - JLabel 的高度随行数增长

java - Gremlin 驱动程序在使用多个端点初始化 ConnectionPool 时阻塞

java - TinkerPop - 从多个顶点检索值会产生奇怪的输出

python - gremlin python - 向顶点添加多个但数量未知的属性

java.io.FileNotFoundException,错误是什么?