Date
1 - 2 of 2
Ability to read adjacent vertex properties in vertex program
"anj...@gmail.com" <anjani...@...>
Hi All,
In our graph, related nodes are connected to a master node. So as part of vertex program i was thinking to just get all master nodes and from master node get all connected nodes. So finally output should be like below and i should be able to read properties from derived list of vertices. [MasterNode] -> List of connected nodes, ex : V(masternode) -> [ V(a), V(b), V(c)] I noticed vertex.inVertex() returns ComputerAdjacentVertex and it does not have properties, all properties are dropped. Is there any way to read adjacent vertex properties in vertex program? Please note i am not using adjacent vertex property for any traversal logic but want to read just as part of final result. Thanks, Anjani |
|
HadoopMarc <bi...@...>
Hi Anjani, In a VertexProgram you cannot read properties from neighbouring vertices using the ComputerAdjacentVertex. You have to pass data between vertices explicitly using the messenger object in the execute method of the VertexProgram: https://github.com/apache/tinkerpop/blob/3.4.8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/VertexProgram.java Best wishes, Marc Op dinsdag 17 november 2020 om 15:42:02 UTC+1 schreef anj...@...: Hi All, |
|