GitHub user shghatge opened a pull request:
https://github.com/apache/flink/pull/847
[FLINK-1520]Read edges and vertices from CSV files
[FLINK-1520]Read edges and vertices from CSV files
Changes done->
1) Added a GraphCsvReader class which has 2 CsvReaders as members
EdgeReader and VertexReader
To make smooth chaining of functions possible for configuration of the
member CsvReaders implemented the configuration methods in CsvReader in
GraphCsvReader so that all the configurations can be done on both CsvReaders on
calling the function once and the methods again return a GraphCsvReader
Only the methods to specify which fields are supposed to be chosen from the
individual files are separate for Edge and Vertex reader.
Since specifying types is necessary because of type-erasure, implemented a
types method in the GraphCsvReader class that returns a Graph with the
specified types as the type for VertexID, Vertex Value and Edge Value. Other
way for doing this was sending the types in a method to construct the graph
itself but to make it as similar to CsvReader as possible this approach was
taken.
2) Added 3 methods in Graph.java similar to other methods for Graph
creation. These methods use one mandatory path and one optional path and
optional mapper for Graph Creation. Only difference is that these methods
return an instance of GraphCsvReader instead of Graph.
3)Added appropriate methods in GraphCreationITCase and
GraphCreationWithMapperITCase,java
Also added createTempFile() method to both to help with the tests.
4) Added the documentation for the new functionalities to gelly_guide.md
Closed the previous pull request and made a new one with a fresh branch
because the previous changes are not merged yet.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/shghatge/flink csv_clear_pull
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/847.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #847
----
commit b7c1079f9fe56a2586f36f8b5eca5208b33e9cf8
Author: Shivani <[email protected]>
Date: 2015-06-17T13:37:36Z
[FLINK-1520]Read edges and vertices from CSV files
----
---
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.
---