[ https://issues.apache.org/jira/browse/FLINK-1523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14501278#comment-14501278 ]
ASF GitHub Bot commented on FLINK-1523: --------------------------------------- Github user vasia commented on a diff in the pull request: https://github.com/apache/flink/pull/537#discussion_r28643344 --- Diff: docs/gelly_guide.md --- @@ -380,6 +380,16 @@ all aggregates globally once per superstep and makes them available in the next * <strong>Broadcast Variables</strong>: DataSets can be added as [Broadcast Variables](programming_guide.html#broadcast-variables) to the `VertexUpdateFunction` and `MessagingFunction`, using the `addBroadcastSetForUpdateFunction()` and `addBroadcastSetForMessagingFunction()` methods, respectively. +* <strong>Number of Vertices</strong>: Accessing the total number of vertices within the iteration. This property can be set using the `setOptNumVertices()` method. + +The number of vertices can then be accessed in the vertex update function and in the messaging function using the `getNumberOfVertices()` method. + +* <strong>Degrees</strong>: Accessing the in/out degree for a vertex within an iteration. This property can be set using the `setOptDegrees()` method. + +The in/out degrees can then be accessed in the vertex update function and in the messaging function, per vertex using `vertex.getInDegree()` or `vertex.getOutDegree()`. + +* <strong>Messaging Direction</strong>: The direction in which messages are sent. This can be either EdgeDirection.IN, EdgeDirection.OUT, EdgeDirection.ALL. The messaging direction also dictates the update direction which would be EdgeDirection.OUT, EdgeDirection.IN and EdgeDirection.ALL, respectively. This property can be set using the `setDirection()` method. + --- End diff -- First, I would highlight the `EdgeDirection.IN` etc. Then, maybe we can rephrase this to make a bit clearer. I would write something like the following: "By default a vertex sends messages to its out-neighbors and thus, updates its value based on received messages from its in-neighbors. This configuration option allows to change the messaging direction and set it to [...]. The messaging direction also dictates the update direction." We could also add a couple of figures to illustrate the messaging-update directions. I can create those, so that they're in the same format as the rest of the figures in the guide. > Vertex-centric iteration extensions > ----------------------------------- > > Key: FLINK-1523 > URL: https://issues.apache.org/jira/browse/FLINK-1523 > Project: Flink > Issue Type: Improvement > Components: Gelly > Reporter: Vasia Kalavri > Assignee: Andra Lungu > > We would like to make the following extensions to the vertex-centric > iterations of Gelly: > - allow vertices to access their in/out degrees and the total number of > vertices of the graph, inside the iteration. > - allow choosing the neighborhood type (in/out/all) over which to run the > vertex-centric iteration. Now, the model uses the updates of the in-neighbors > to calculate state and send messages to out-neighbors. We could add a > parameter with value "in/out/all" to the {{VertexUpdateFunction}} and > {{MessagingFunction}}, that would indicate the type of neighborhood. -- This message was sent by Atlassian JIRA (v6.3.4#6332)