我正在使用 gremlinpython 版本 3.3.2 和 AWS NEPTUNE。
我尝试删除所有边(也尝试过顶点),但每次都失败。
g.E().drop().iterate()
给我:
gremlin_python.driver.protocol.GremlinServerError:597:异常
根据请求处理脚本 [RequestMessage{,
requestId=ae49cbb7-e034-4e56-ac76-b62310f753c2, op='字节码',
处理器='遍历', args={gremlin=[[], [V(), drop()]],
别名={g=g}}}]。
有人已经成功删除了 AWS Neptune 中图形的所有顶点/边吗?
编辑:
删除特定 ID 的工作原理:
g.E(id).drop().iterate()
EDIT2:
这是使用 gremlin 控制台完成的回溯:
gremlin> g.E().count().next()
==>740839
gremlin> g.E().drop().iterate()
在评估 [RequestMessage{, requestId=24c3d14c-c8be-4ed9-a297-3fd2b38ace9a, op='eval', >processor='', args={gremlin=g.E().drop() 期间,脚本内发生超时。 iterate(), bindings={}, batchSize=64}}] - 考虑增加超时
输入“:help”或“:h”获取帮助。
显示堆栈跟踪? [yN]y
org.apache.tinkerpop.gremlin.jsr223.console.RemoteException:评估 [RequestMessage{, > requestId=24c3d14c-c8be-4ed9-a297-3fd2b38ace9a, op='eval',processor='' 期间脚本内发生超时, args={gremlin=g.E().drop().iterate(), bindings={}, > batchSize=64}}] - 考虑增加超时
在org.apache.tinkerpop.gremlin.console.jsr223.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:178)
在 org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:99)
在 org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
在 org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
在 org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)
在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在 java.lang.reflect.Method.invoke(Method.java:498)
在 org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
在 groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
在 groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
在 org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:145)
在 org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:165)
在 org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:130)
在 org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
在 org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)
在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在 java.lang.reflect.Method.invoke(Method.java:498)
在 org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
在 groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
在 groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
在 org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:145)
在 org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:165)
在 org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:89)
在 org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:236)
在 org.apache.tinkerpop.gremlin.console.Console。(Console.groovy:146)
在 org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:236)
在 org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:453)
妖精>
我会说这是一个超时问题,对吧?
好的,在与 @stephen mallette 评论问题和 AWS 支持进行交流后,我终于找到了问题所在。
由于它仍然是预览版 NEPTUNE 仍然遇到一些小问题并且drop()
is one.
支持人员给出的解决方法是执行drop()
通过并行连接批量:
g.V().limit(1000).drop()
因此,即使有 5 分钟的超时和 700.000 条边,丢表现在也会遇到超时。
我将在 NEPTUNE 发布时更新此答案。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)