tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc de Lignie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TINKERPOP-1306) TraversalVertexPrograms don't store halted traversers
Date Thu, 27 Jun 2019 18:57:00 GMT

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

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

[~spmallette] Yes, I verified that the CloneVertexProgram works allright for the workaround
given in the issue above. I just forgot about the CloneVertexProgram but it does not hurt
that it is mentioned now in this place.

> 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)

Mime
View raw message