Github user vasia commented on the pull request:
https://github.com/apache/flink/pull/1900#issuecomment-214819709
Implementations of `MapFunction`s can also be reused :)
What I was thinking was to provide the translator simply as map functions,
e.g. like `Tuple2ToVertexMap`. We can add them to
`org.apache.flink.graph.utils` or create a subpackage for that. Then we can add
the `translate*` methods to `Graph`. If someone wants to use the provided
translator on a dataset of vertices or edges, they can simply do this with a
mapper.
My concern is that we should try to be consistent with the existing Gelly
API. e.g. something like `graph.translateIds(new LongValueToStringValue())` is
Gelly-like, while
`Translate.translateGraphLabels(graph, new LongValueToStringValue())` is
not. Also, I think that this feature is simple enough to be implemented as a
collection of map functions instead of a separate utility.
---
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.
---