Github user vasia commented on the pull request:
https://github.com/apache/flink/pull/1900#issuecomment-215428452
Hi @greghogan,
I feel we're over-engineering something that should be way simpler...
Translators are just a set of `MapFunction`s applied on vertex or edge ids and
values. I think that the current API is way too complex for what it does, e.g.
`graph.run(new
TranslateEdgeValues<LongValue,LongValue,LongValue,StringValue>(new
LongValueToStringValue()))` seems too verbose to me for mapping an edge value.
It could be as simple as `graph.mapEdges(new LongValueToStringValue())`.
Also, I don't think we need 6 methods. We could either add 4 methods to
`Graph`, i.e. `mapVertexIDs`, `mapVertexValues`, `mapEdgeIds`, `mapEdgeValues`
or extend the `mapEdges` and `mapVertices` methods. In the latter case, we will
have to provide specialized mappers as you note above, e.g.
`MapVertexValueLongToString`, `MapEdgeValueLongToString`, etc., but these can
internally wrap the same mapper.
Please let me know your thought on this! Thanks!
---
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.
---