Github user andralungu commented on a diff in the pull request:
https://github.com/apache/flink/pull/537#discussion_r28785218
--- Diff:
flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/spargel/VertexCentricIteration.java
---
@@ -138,69 +146,46 @@ public void setInput(DataSet<Vertex<VertexKey,
VertexValue>> inputData) {
if (this.initialVertices == null) {
--- End diff --
I made that division in order to avoid having duplicate code: the number of
vertices and the direction are totally independent of the "degree" option which
is why they can be set in the createResult() method. Afterwards, the code does
exactly what you described in this comment: it separates the creation of a
delta iteration and the creation of the messaging function plus vertex update
function according to the vertex type(with degrees or not). It's not just the
vertex that changes, but everything that uses its value afterwards changes too.
I suggest you look a bit closer at the createResultVerticesWithDegrees and
createResultSimpleVertex methods. I don't think their functionality can be
simplified by just creating a simple vertex and a vertex with degrees.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---