You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marc de Lignie (JIRA)" <ji...@apache.org> on 2019/06/23 12:07:00 UTC

[jira] [Commented] (TINKERPOP-1306) TraversalVertexPrograms don't store halted traversers

    [ https://issues.apache.org/jira/browse/TINKERPOP-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16870534#comment-16870534 ] 

Marc de Lignie commented on TINKERPOP-1306:
-------------------------------------------

BulkDumperVertexProgram was deprecated in TinkerPop 3.4 so the workaround presented above will not be available anymore in v3.5.

> TraversalVertexPrograms don't store halted traversers
> -----------------------------------------------------
>
>                 Key: TINKERPOP-1306
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1306
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.2.0-incubating
>            Reporter: Daniel Kuppitz
>            Assignee: Marko A. Rodriguez
>            Priority: Major
>
> 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
(v7.6.3#76005)