Date
1 - 1 of 1
Shortest Path without TinkerGraph
Carlos Bobed <carlo...@...>
Hi all,
I'm a complete newbie user of Janusgraph, and I've tried just to calculate the shortest path between two nodes following the gremlin recipes. I'm playing with the air-routes graph used in Kevin Lawrence's book (https://kelvinlawrence.net/book/Gremlin-Graph-Guide.html) loading it into a TinkerGraph instance, as well as into a Cassandra-backed one. In the first case, the following code ends without a problem: (airG2 is the traveral for tinkergraph, airG is the one for the Cassandra-backed graph) airG2.withComputer().V().has('code', 'BCN').shortestPath() .with(ShortestPath.target, has('code', 'LHR')) .with(ShortestPath.includeEdges, true) (I've also tested with 'SEA' to get longer paths) but using exactly the same code on the other traversal ends up with the following message: remlin> airG.withComputer().V().has('code', 'BCN').shortestPath().with(ShortestPath.target, has('code', 'LHR')).with(ShortestPath.includeEdges, true) Failed to process [1] vertices in vertex program iteration [1]. Computer is aborting. Type ':help' or ':h' for help. Display stack trace? [yN]y org.janusgraph.core.JanusGraphException: Failed to process [1] vertices in vertex program iteration [1]. Computer is aborting. at org.janusgraph.graphdb.olap.computer.FulgoraGraphComputer.executeOnNonPartitionedVertices(FulgoraGraphComputer.java:268) at org.janusgraph.graphdb.olap.computer.FulgoraGraphComputer.executeIterationOfJob(FulgoraGraphComputer.java:233) at org.janusgraph.graphdb.olap.computer.FulgoraGraphComputer.executeVertexProgram(FulgoraGraphComputer.java:214) at org.janusgraph.graphdb.olap.computer.FulgoraGraphComputer.submitAsync(FulgoraGraphComputer.java:193) at org.janusgraph.graphdb.olap.computer.FulgoraGraphComputer.lambda$submit$0(FulgoraGraphComputer.java:156) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) If instead of the shortestPath step, I use the VertexProgram directly, it behaves in the same way (Ok for tinkerGraph, but an exception is raised for Cassandra Graph). Moreover, this behaviour is also present when using BerkeleyDB as backend. Have anyone experienced this before? Besides (this is a more Gremlin question I think), when using the VertexProgram directly, the memory comes empty: sp = ShortestPathVertexProgram.build() .source(airG2.V().has('code', 'BCN')) .target(airG2.V().has('code', 'LHR')) .includeEdges(true).create() result = airGraphMem.compute().program(sp).submit().get() returns a result with the whole graph and a memory of size 0. What am I doing wrong? Thank you very much in advance, Best, Carlos |
|