Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/537#issuecomment-96558324
Looks good in general. A few thoughts on this:
Your prior discussion involved efficiency, and Vasia suggested to not carry
the degrees in all cases (as they are not needed in most cases). It seems that
was not yet realized, because the Vertex class always carries the degrees.
I think we can improve the abstraction between the with-degree and
without-degree case a bit. Cases where one has to throw a "not supported" can
usually be improved with a good inheritance hierarchy. Does it work to make the
VertexWithDegrees class a subclass of the Vertex class?
Also, as a bit of background: Vertex is a subclass of "Tuple2". Tuples are
currently the fastest data types in Flink. By adding additional Fields to the
Tuple, you are making it a POJO (as far as I know), which is a bit slower to
serialize type.
Also: primitives are usually better than boxed types. Prefer `long` over
`Long` where possible.
---
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.
---