[ https://issues.apache.org/jira/browse/TINKERPOP-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kuppitz updated TINKERPOP-1306: -------------------------------------- Description: Traversal vertex programs only store their halted traversers if the traversal contains another vertex program (job chaining). *Simple traversal (wrong result):* {noformat} gremlin> graph = GraphFactory.open("conf/hadoop/hadoop-gryo.properties") ==>hadoopgraph[gryoinputformat->gryooutputformat] gremlin> g = graph.traversal().withComputer(compute().persist(GraphComputer.Persist.EDGES).result(GraphComputer.ResultGraph.NEW)) ==>graphtraversalsource[hadoopgraph[gryoinputformat->gryooutputformat], graphcomputer] gremlin> g.withSack(1f).V().hasLabel("person").as("p"). gremlin> outE("created").sack(mult).by("weight").inV(). gremlin> inE("created").sack(mult).by("weight").outV().as("c"). gremlin> select("p","c").by(id).where("p", lt("c")). gremlin> sack().as("weight"). gremlin> select("p").values("name").as("name"). gremlin> select("c").values("name").as("coworker") ==>josh ==>peter ==>peter gremlin> hdfs.head("output/~g", GryoInputFormat).each {println it.property(TraversalVertexProgram.HALTED_TRAVERSERS)} vp[empty] vp[empty] vp[empty] vp[empty] vp[empty] vp[empty] gremlin> {noformat} *With job chaining (correct result):* {noformat} gremlin> graph = GraphFactory.open("conf/hadoop/hadoop-gryo.properties") ==>hadoopgraph[gryoinputformat->gryooutputformat] gremlin> g = graph.traversal().withComputer() ==>graphtraversalsource[hadoopgraph[gryoinputformat->gryooutputformat], graphcomputer] gremlin> g.withSack(1f).V().hasLabel("person").as("p"). gremlin> outE("created").sack(mult).by("weight").inV(). gremlin> inE("created").sack(mult).by("weight").outV().as("c"). gremlin> select("p","c").by(id).where("p", lt("c")). gremlin> sack().as("weight"). gremlin> select("p").values("name").as("name"). gremlin> select("c").values("name").as("coworker"). gremlin> program(BulkDumperVertexProgram.build().create(graph)) ==>josh ==>peter ==>peter gremlin> hdfs.head("output/~g", GryoInputFormat).each {println it.property(TraversalVertexProgram.HALTED_TRAVERSERS)} vp[gremlin.traversalVertexProgram.haltedTraversers->[josh]] vp[empty] vp[gremlin.traversalVertexProgram.haltedTraversers->[peter, peter]] vp[empty] vp[empty] vp[empty] gremlin> {noformat} was: Traversal vertex programs only store their halted traversers if the traversal contains another vertex program (job chaining). *Simple traversal (wrong result):* {noformat} gremlin> graph = GraphFactory.open("conf/hadoop/hadoop-gryo.properties") ==>hadoopgraph[gryoinputformat->gryooutputformat] gremlin> g = graph.traversal().withComputer(compute().persist(GraphComputer.Persist.EDGES).result(GraphComputer.ResultGraph.NEW)) ==>graphtraversalsource[hadoopgraph[gryoinputformat->gryooutputformat], graphcomputer] gremlin> g.withSack(1f).V().hasLabel("person").as("p"). gremlin> outE("created").sack(mult).by("weight").inV(). gremlin> inE("created").sack(mult).by("weight").outV().as("c"). gremlin> select("p","c").by(id).where("p", lt("c")). gremlin> sack().as("weight"). gremlin> select("p").values("name").as("name"). gremlin> select("c").values("name").as("coworker") ==>josh ==>peter ==>peter gremlin> hdfs.head("output/~g", GryoInputFormat).each {println it.property(TraversalVertexProgram.HALTED_TRAVERSERS)} vp[empty] vp[empty] vp[empty] vp[empty] vp[empty] vp[empty] gremlin> {noformat} *With job chaining (correct result):* {noformat} gremlin> graph = GraphFactory.open("conf/hadoop/hadoop-gryo.properties") ==>hadoopgraph[gryoinputformat->gryooutputformat] gremlin> g = graph.traversal().withComputer(compute().persist(GraphComputer.Persist.EDGES).result(GraphComputer.ResultGraph.NEW)) ==>graphtraversalsource[hadoopgraph[gryoinputformat->gryooutputformat], graphcomputer] gremlin> g.withSack(1f).V().hasLabel("person").as("p"). gremlin> outE("created").sack(mult).by("weight").inV(). gremlin> inE("created").sack(mult).by("weight").outV().as("c"). gremlin> select("p","c").by(id).where("p", lt("c")). gremlin> sack().as("weight"). gremlin> select("p").values("name").as("name"). gremlin> select("c").values("name").as("coworker"). gremlin> program(BulkDumperVertexProgram.build().create(graph)) ==>josh ==>peter ==>peter gremlin> hdfs.head("output/~g", GryoInputFormat).each {println it.property(TraversalVertexProgram.HALTED_TRAVERSERS)} vp[gremlin.traversalVertexProgram.haltedTraversers->[josh]] vp[empty] vp[gremlin.traversalVertexProgram.haltedTraversers->[peter, peter]] vp[empty] vp[empty] vp[empty] gremlin> {noformat} > TraversalVertexPrograms don't store halted traversers > ----------------------------------------------------- > > Key: TINKERPOP-1306 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1306 > Project: TinkerPop > Issue Type: Bug > Affects Versions: 3.2.0-incubating > Reporter: Daniel Kuppitz > Assignee: Marko A. Rodriguez > > Traversal vertex programs only store their halted traversers if the traversal > contains another vertex program (job chaining). > *Simple traversal (wrong result):* > {noformat} > gremlin> graph = GraphFactory.open("conf/hadoop/hadoop-gryo.properties") > ==>hadoopgraph[gryoinputformat->gryooutputformat] > gremlin> g = > graph.traversal().withComputer(compute().persist(GraphComputer.Persist.EDGES).result(GraphComputer.ResultGraph.NEW)) > ==>graphtraversalsource[hadoopgraph[gryoinputformat->gryooutputformat], > graphcomputer] > gremlin> g.withSack(1f).V().hasLabel("person").as("p"). > gremlin> outE("created").sack(mult).by("weight").inV(). > gremlin> inE("created").sack(mult).by("weight").outV().as("c"). > gremlin> select("p","c").by(id).where("p", lt("c")). > gremlin> sack().as("weight"). > gremlin> select("p").values("name").as("name"). > gremlin> select("c").values("name").as("coworker") > ==>josh > ==>peter > ==>peter > gremlin> hdfs.head("output/~g", GryoInputFormat).each {println > it.property(TraversalVertexProgram.HALTED_TRAVERSERS)} > vp[empty] > vp[empty] > vp[empty] > vp[empty] > vp[empty] > vp[empty] > gremlin> > {noformat} > *With job chaining (correct result):* > {noformat} > gremlin> graph = GraphFactory.open("conf/hadoop/hadoop-gryo.properties") > ==>hadoopgraph[gryoinputformat->gryooutputformat] > gremlin> g = graph.traversal().withComputer() > ==>graphtraversalsource[hadoopgraph[gryoinputformat->gryooutputformat], > graphcomputer] > gremlin> g.withSack(1f).V().hasLabel("person").as("p"). > gremlin> outE("created").sack(mult).by("weight").inV(). > gremlin> inE("created").sack(mult).by("weight").outV().as("c"). > gremlin> select("p","c").by(id).where("p", lt("c")). > gremlin> sack().as("weight"). > gremlin> select("p").values("name").as("name"). > gremlin> select("c").values("name").as("coworker"). > gremlin> program(BulkDumperVertexProgram.build().create(graph)) > ==>josh > ==>peter > ==>peter > gremlin> hdfs.head("output/~g", GryoInputFormat).each {println > it.property(TraversalVertexProgram.HALTED_TRAVERSERS)} > vp[gremlin.traversalVertexProgram.haltedTraversers->[josh]] > vp[empty] > vp[gremlin.traversalVertexProgram.haltedTraversers->[peter, peter]] > vp[empty] > vp[empty] > vp[empty] > gremlin> > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)