flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Faye Beligianni (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-1815) Add methods to read and write a Graph as adjacency list
Date Mon, 03 Oct 2016 09:41:20 GMT

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

Faye Beligianni commented on FLINK-1815:
----------------------------------------

Hey, 

I am not sure why I wasn't aware of the {{FieldParser}}'s functionality, that would have save
me a lot of time since I wouldn't have to use the  {{GraphAdjacencyListReader.fromString()}}
and test again and again the parsing functionality :/ . I am sorry for that, but of course
I can/will change that. 

Regarding the string splits and concatenations, since I read the file with the {{readTextFile}}
method, I used java's {{String.split}} method for the splits.  I split each line with respect
to the delimiters separating: the source from the neighbours, the vertex ids from the vertex/edge
values e.t.c. . Again, please tell me if there is a better way to perform the splits of a
text line.

If though you believe that this read/write a Graph as adjacency list issue should be approached
in a much different way, than the one I implemented, of course I have no problem to reassign
the ticket, or reject the PR and discuss further the implementation of this issue.



> Add methods to read and write a Graph as adjacency list
> -------------------------------------------------------
>
>                 Key: FLINK-1815
>                 URL: https://issues.apache.org/jira/browse/FLINK-1815
>             Project: Flink
>          Issue Type: New Feature
>          Components: Gelly
>    Affects Versions: 0.9
>            Reporter: Vasia Kalavri
>            Assignee: Faye Beligianni
>            Priority: Minor
>
> It would be nice to add utility methods to read a graph from an Adjacency list format
and also write a graph in such a format.
> The simple case would be to read a graph with no vertex or edge values, where we would
need to define (a) a line delimiter, (b) a delimiter to separate vertices from neighbor list
and (c) and a delimiter to separate the neighbors.
> For example, "1 2,3,4\n2 1,3" would give vertex 1 with neighbors 2, 3 and 4 and vertex
2 with neighbors 1 and 3.
> If we have vertex values and/or edge values, we also need to have a way to separate IDs
from values. For example, we could have "1 0.1 2 0.5, 3 0.2" to define a vertex 1 with value
0.1, edge (1, 2) with weight 0.5 and edge (1, 3) with weight 0.2.



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

Mime
View raw message