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

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

Github user vasia commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1900#discussion_r61550681
  
    --- Diff: 
flink-libraries/flink-gelly-scala/src/main/scala/org/apache/flink/graph/scala/Graph.scala
 ---
    @@ -407,6 +407,36 @@ TypeInformation : ClassTag](jgraph: jg.Graph[K, VV, 
EV]) {
       }
     
       /**
    +   * Relabels vertices and edges using the given MapFunction.
    +   *
    +   * @param translator implements conversion from K to NEW
    +   * @return relabeled graph
    +   */
    +  def translateGraphLabels[NEW: TypeInformation : ClassTag](translator: 
MapFunction[K, NEW]): Graph[NEW,VV,EV] = {
    --- End diff --
    
    In the the Gelly code and docs, we refer to the vertex and edge keys as 
"Ids", not labels. I think we should rename the methods and javadocs to be 
consistent.


> 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