{"action":"created","issue":{"url":"https://api.github.com/repos/project-flink/flink-graph/issues/53","labels_url":"https://api.github.com/repos/project-flink/flink-graph/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/project-flink/flink-graph/issues/53/comments","events_url":"https://api.github.com/repos/project-flink/flink-graph/issues/53/events","html_url":"https://github.com/project-flink/flink-graph/issues/53","id":54000778,"number":53,"title":"Naming consistency for graph creation functions","user":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-01-11T18:58:18Z","updated_at":"2015-01-20T22:38:54Z","closed_at":null,"body":"As far as I found there are the following methods to create a `Graph` object:\r\n\r\nConstructors:\r\n\r\n- public Graph(vertices, edges, context)\r\n- public Graph(vertices, edges, context, undirected)\r\n\r\nMethods:\r\n\r\n- `public static create(vertices, edges, context)`\r\n- `public static create(edges, context)`\r\n- `public static create(edges, mapper, context)`\r\n- `public fromCollection(vertices, edges)`, context is from `this.context` here\r\n- `public static fromCollection(context, vertices, edges)`\r\n- `public static fromCollection(context, edges)`\r\n- `public static fromCollection(context, edges, mapper)`\r\n\r\nThere is also this method which does not really fit into the above set.\r\n- `public static readTuple2CsvFile(context, filePath, delimiter, TupleIdClass, Tuple2ValueClass)`\r\n\r\nAs you can see there is a bit of inconsistency between the API and naming.\r\n\r\n1. why do we have multiple ways of creating the same graph through create methods and constructors? isn't it enough to have constructors only?\r\n\r\n2. why are there `create()` and `fromCollection()`. These should either be only `create()` methods differentiated by polymorphy or `fromCollection()` should be renamed to `createFromCollection()`.\r\n\r\n3. If we provide readTuple2CsvFile we should have similar methods for loading edges from a CSV file. This may better be put into another class because Graph is already quite big.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/project-flink/flink-graph/issues/comments/70749262","html_url":"https://github.com/project-flink/flink-graph/issues/53#issuecomment-70749262","issue_url":"https://api.github.com/repos/project-flink/flink-graph/issues/53","id":70749262,"user":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T22:38:54Z","updated_at":"2015-01-20T22:38:54Z","body":"I have created a pull request for the CSV methods, any opinions on the rename of `getContext()` to `getExecutionEnvironment()`."}}