{"action":"created","issue":{"url":"https://api.github.com/repos/apache/flink/issues/847","labels_url":"https://api.github.com/repos/apache/flink/issues/847/labels{/name}","comments_url":"https://api.github.com/repos/apache/flink/issues/847/comments","events_url":"https://api.github.com/repos/apache/flink/issues/847/events","html_url":"https://github.com/apache/flink/pull/847","id":89019627,"number":847,"title":"[FLINK-1520]Read edges and vertices from CSV files","user":{"login":"shghatge","id":6418348,"avatar_url":"https://avatars.githubusercontent.com/u/6418348?v=3","gravatar_id":"","url":"https://api.github.com/users/shghatge","html_url":"https://github.com/shghatge","followers_url":"https://api.github.com/users/shghatge/followers","following_url":"https://api.github.com/users/shghatge/following{/other_user}","gists_url":"https://api.github.com/users/shghatge/gists{/gist_id}","starred_url":"https://api.github.com/users/shghatge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shghatge/subscriptions","organizations_url":"https://api.github.com/users/shghatge/orgs","repos_url":"https://api.github.com/users/shghatge/repos","events_url":"https://api.github.com/users/shghatge/events{/privacy}","received_events_url":"https://api.github.com/users/shghatge/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-17T13:41:14Z","updated_at":"2015-06-19T11:27:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/847","html_url":"https://github.com/apache/flink/pull/847","diff_url":"https://github.com/apache/flink/pull/847.diff","patch_url":"https://github.com/apache/flink/pull/847.patch"},"body":"\r\n[FLINK-1520]Read edges and vertices from CSV files\r\n\r\nChanges done->\r\n1) Added a GraphCsvReader class which has 2 CsvReaders as members EdgeReader and VertexReader\r\n\r\nTo 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 either Edge Csv Reader or Vertex Csv reader.\r\n\r\nSince 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.\r\n\r\n2) 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.\r\n\r\n3)Added appropriate methods in GraphCreationITCase and GraphCreationWithMapperITCase,java\r\nAlso added createTempFile() method to both to help with the tests.\r\n\r\n4) Added the documentation for the new functionalities to gelly_guide.md\r\n\r\n\r\nClosed the previous pull request and made a new one with a fresh branch because the previous changes are not merged yet."},"comment":{"url":"https://api.github.com/repos/apache/flink/issues/comments/113483077","html_url":"https://github.com/apache/flink/pull/847#issuecomment-113483077","issue_url":"https://api.github.com/repos/apache/flink/issues/847","id":113483077,"user":{"login":"andralungu","id":2550549,"avatar_url":"https://avatars.githubusercontent.com/u/2550549?v=3","gravatar_id":"","url":"https://api.github.com/users/andralungu","html_url":"https://github.com/andralungu","followers_url":"https://api.github.com/users/andralungu/followers","following_url":"https://api.github.com/users/andralungu/following{/other_user}","gists_url":"https://api.github.com/users/andralungu/gists{/gist_id}","starred_url":"https://api.github.com/users/andralungu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andralungu/subscriptions","organizations_url":"https://api.github.com/users/andralungu/orgs","repos_url":"https://api.github.com/users/andralungu/repos","events_url":"https://api.github.com/users/andralungu/events{/privacy}","received_events_url":"https://api.github.com/users/andralungu/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T11:27:57Z","updated_at":"2015-06-19T11:27:57Z","body":"Mea culpa. No the mapper test is fine;\r\n\r\nFor the examples comment, I meant to go through the classes in the example folder and to modify the way the graph is currently read. Right now, we fetch the edges via `env.fromCsv` and then use `Graph.fromDataSet` to create the graph. We should do it directly via Graph.fromCsv. \r\n\r\nThe example in the docs is fine, because it explains how fromDataSet works. That is still available. "}}