【问题标题】:gremlin how to set scriptevaluationtimeout 0gremlin 如何设置 scriptevaluationtimeout 0
【发布时间】:2020-12-15 02:19:54
【问题描述】:

我想将 scriptevaluationtimeout 设置为 0。
我正在使用 apache-tinkerpop-gremlin-console-3.4.9。
我想使用 gremlin-python。

【问题讨论】:

  • 你打算做什么? scriptevaluationtimeout 为 0 将导致每个查询失败。那是你要的吗? apache-tinkerpop-gremlin-console 在内部使用 groovy 并且与 gremlin-python 不同。您是否正在寻找两者的答案?
  • 0 是同时禁用超时的配置。

标签: gremlin gremlin-server gremlinpython


【解决方案1】:

正如上面提到的问题,尚不清楚您是指 Gremlin Console 还是 gremlin-python,所以我将两种方式都回答。对于 Gremlin 控制台,远程连接的首选方法是发出以下命令:

gremlin> :remote connect tinkerpop.server conf/remote.yaml 
==>Configured localhost/127.0.0.1:8182
gremlin> :remote config timeout none

以上内容详见参考文档的this section。对于 gremlin-python,您可以按照 here for scripts 所述配置每个请求超时:

result_set = client.submit('g.V().repeat(both()).times(100)', result_options={'evaluationTimeout': 0})

或here for bytecode:

vertices = g.with_('evaluationTimeout', 0).V().out('knows').toList()

【讨论】:

  • 谢谢。 gremlin> :remote config timeout none ==>Remote timeout is disabled 脚本评估超过了配置的 'scriptEvaluationTimeout' 阈值 30000 ms 或评估被直接取消请求 [graph.traversal().withComputer().V().has ('lat', 34.66494274048).shortestPath().with(ShortestPath.target, __.has('lat', 34.66561185416)).with(ShortestPath.distance, 'cost')]
  • 我想是的。我设置了远程配置超时 none ,上面遍历失败(scriptEvaluationTimeout)。我将通过 python-gremlin 尝试相同的查询。
  • 你用的是什么图数据库?
  • 我使用docker image tinkerpop/gremlin-server:3.4.9
  • :远程配置超时 3000000 工作。但评估超时。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-07-01
  • 1970-01-01
  • 2013-03-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多