The given graph instance does not allow concurrent access

79 views
Skip to first unread message

Laxmikant Patil

unread,
Feb 4, 2016, 7:20:30 PM2/4/16
to Aurelius
I am using Titan 1.0.0.

gremlin> writeGraphConf = new BaseConfiguration()
==>org.apache.commons.configuration.BaseConfiguration@6a638c79
gremlin> writeGraphConf.setProperty("gremlin.graph", "org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph")
==>null
gremlin> writeGraphConf.setProperty("gremlin.tinkergraph.graphFormat", "gryo")
==>null
gremlin> writeGraphConf.setProperty("gremlin.tinkergraph.graphLocation", "/tmp/tinkergraph.kryo")
==>null
gremlin> modern = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]
gremlin> blvp = BulkLoaderVertexProgram.build().
                    keepOriginalIds(false).
                    writeGraph(writeGraphConf).create(modern)
==>BulkLoaderVertexProgram[bulkLoader=IncrementalBulkLoader,vertexIdProperty=bulkLoader.vertex.id,userSuppliedIds=false,keepOriginalIds=false,batchSize=0]
gremlin> modern.compute().program(blvp).submit().get()

This gives error as:

java.lang.RuntimeException: java.lang.IllegalStateException: The given graph instance does not allow concurrent access.

Display stack trace? [yN] y
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.IllegalStateException: The given graph instance does not allow concurrent access.
    at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
    at java_util_concurrent_Future$get.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
    at groovysh_evaluate.run(groovysh_evaluate:3)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
    at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
    at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
    at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)


What could be the reason?  I have not modified anything. I am just running the given code.

Marko Rodriguez

unread,
Feb 4, 2016, 7:24:01 PM2/4/16
to aureliu...@googlegroups.com
Hi,

TinkerGraph does not support concurrent writes.

writeGraphConf.setProperty("gremlin.graph", "org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph")

You can set the workers() to 1 and that should work.

modern.compute().program(blip).workers(1).submit().get()

Also, note that there is nothing Titan here, you are using TinkerGraph to read from and write too. Just in case that is a "oh yea, damn" for you.

Good luck,
Marko.
--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/45c7e125-d59c-4041-9c59-0af11ad81f2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Laxmikant Patil

unread,
Feb 4, 2016, 7:34:02 PM2/4/16
to Aurelius
Hi Marko,

Thanks for reply.

But Now i get this error, which says no such method since graph computer does not have ny method called workers()

gremlin> modern.compute().program(blvp).workers(1).submit().get()
No signature of method: org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer.workers() is applicable for argument types: (java.lang.Integer) values: [1]

Display stack trace? [yN] y
groovy.lang.MissingMethodException: No signature of method: org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer.workers() is applicable for argument types: (java.lang.Integer) values: [1]
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:56)
    at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)

    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)

    at groovysh_evaluate.run(groovysh_evaluate:3)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
    at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
    at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
    at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)




Reply all
Reply to author
Forward
0 new messages