Github user vasia commented on the pull request:
https://github.com/apache/flink/pull/818#issuecomment-112814353
Hey,
difference in not a fancy way of removing vertices, no :)
If you recall our previous conversation in #678, we decided to have
add/remove methods for small mutations (i.e. can be stored in a List) and
union/difference for large mutations (for large data in the form of Graph).
The `collect()` method is not "unsafe". It is simply not advised to be used
for large datasets. If you think about it, it needs to retrieve the data (which
might be distributed over several nodes) from to local JVM and trigger the
program execution.
If you found that the only way to implement `difference` is to overload
`removeVertices`, then we should also consider what this means in terms of the
API. If we have a remove* method for DataSets, don't we also need a
corresponding add*? You see how this goes back to #678 :)
---
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.
---