[ 
https://issues.apache.org/jira/browse/FLINK-3771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15258510#comment-15258510
 ] 

ASF GitHub Bot commented on FLINK-3771:
---------------------------------------

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.


> Methods for translating Graphs
> ------------------------------
>
>                 Key: FLINK-3771
>                 URL: https://issues.apache.org/jira/browse/FLINK-3771
>             Project: Flink
>          Issue Type: New Feature
>          Components: Gelly
>    Affects Versions: 1.1.0
>            Reporter: Greg Hogan
>            Assignee: Greg Hogan
>             Fix For: 1.1.0
>
>
> Provide methods for translation of the type or value of graph labels, vertex 
> values, and edge values.
> Sample use cases:
> * shifting graph labels in order to union generated graphs or graphs read 
> from multiple sources
> * downsizing labels or values since algorithms prefer to generate wide types 
> which may be expensive for further computation
> * changing label type for testing or benchmarking alternative code paths



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to