GremlinPipeline问题

时间:2014-12-01 14:23:16

标签: graph gremlin titan

我使用以下命令创建了许多Gremlin管道来查询titan graph vertex:

GremlinPipeline管道=新的GremlinPipeline();

由于我无法找到任何方法来释放或重置我的管道,我正在为每个需要查询的顶点创建新实例。这正在创造一个记忆热点。有没有办法在不创建新实例的情况下重用或重置管道?

我尝试使用方法pipeline.remove()和pipeline.reset()但没有运气。

此致 KARTHIK

1 个答案:

答案 0 :(得分:1)

考虑使用childVertices启动您的管道。在Gremlin Groovy中会是:

childVertices._().outE().has(SCORE).or(...

或者我想如果你直接使用GremlinPipeline,那么就像:

new GremlinPipeline(childVertices).has(SCORE).or(....
相关问题