[ https://issues.apache.org/jira/browse/FLINK-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499896#comment-14499896 ]
ASF GitHub Bot commented on FLINK-1758: --------------------------------------- Github user vasia commented on the pull request: https://github.com/apache/flink/pull/576#issuecomment-93996607 Hi @andralungu! Thanks for the quick update ^^ The result looks good, but I have a few more comments/suggestions (apart from the inline ones). - +1 for the `groupReduce*` implementations. These look great :-) - Regarding the combinable versions, I think that the current API is not very intuitive. I understand that you did it like this because you were restricted by the return type of the `ReduceFunction`. I think that it would be better if we simplify these to operate directly on the values, instead of tuples with nested Edge and Vertex data. For example, say you want to compute the sum of all out-neighbors of a vertex. The value types to combine inside the reduce function should be the same as the vertex value type, instead of a Tuple3. In the case of reducing on edges, the type should be the same as the edge value type. Thus, I would make `reduceOnEdges` return `DataSet<Tuple2<K, EV>` and `reduceOnNeighbors` return `DataSet<Tuple2<K, VV>`, i.e. one value per vertex ID. - There is some inconsistency in the naming of the methods, for example the user-defined methods in the group case are called `iterateOn...` and in the reduce case they are called `reduce...`. We should stick to one of these :-) Also, maybe we could find a better name for `ReduceEdgesFunction` and `ReduceNeighborsFunction`. I don't have a suggestion right now, but I'll think about it. - Finally, there are several warnings in your code for unchecked and raw types. Could you turn on warning notifications in your IDE and try to add suppress annotations to get of them? Let me know what you think and whether you have any questions! Thanks again! > Extend Gelly's neighborhood methods > ----------------------------------- > > Key: FLINK-1758 > URL: https://issues.apache.org/jira/browse/FLINK-1758 > Project: Flink > Issue Type: Improvement > Components: Gelly > Affects Versions: 0.9 > Reporter: Vasia Kalavri > Assignee: Andra Lungu > > Currently, the neighborhood methods only allow returning a single value per > vertex. In many cases, it is desirable to return several or no value per > vertex. This is the case in clustering coefficient computation, > vertex-centric jaccard, algorithms where a vertex computes a value per edge > or when a vertex computes a value only for some of its neighbors. > This issue proposes to > - change the current reduceOnEdges/reduceOnNeighbors methods to use > combinable reduce operations where possible > - provide groupReduce-versions, which will use a Collector and allow > returning none or more values per vertex. -- This message was sent by Atlassian JIRA (v6.3.4#6332)