[
https://issues.apache.org/jira/browse/FLINK-1520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602871#comment-14602871
]
ASF GitHub Bot commented on FLINK-1520:
---------------------------------------
Github user andralungu commented on a diff in the pull request:
https://github.com/apache/flink/pull/847#discussion_r33355180
--- Diff:
flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/ConnectedComponents.java
---
@@ -119,23 +113,32 @@ private static boolean parseParameters(String []
args) {
return true;
}
- @SuppressWarnings("serial")
- private static DataSet<Edge<Long, NullValue>>
getEdgesDataSet(ExecutionEnvironment env) {
-
- if(fileOutput) {
- return env.readCsvFile(edgeInputPath)
- .ignoreComments("#")
- .fieldDelimiter("\t")
- .lineDelimiter("\n")
- .types(Long.class, Long.class)
- .map(new MapFunction<Tuple2<Long,
Long>, Edge<Long, NullValue>>() {
- @Override
- public Edge<Long, NullValue>
map(Tuple2<Long, Long> value) throws Exception {
- return new Edge<Long,
NullValue>(value.f0, value.f1, NullValue.getInstance());
+ private static Graph<Long, Long, NullValue>
getGraph(ExecutionEnvironment env)
+ {
+ Graph<Long, Long, NullValue> graph;
+ if(!fileOutput)
+ {
+ DataSet<Edge<Long, NullValue>> edges =
ConnectedComponentsDefaultData.getDefaultEdgeDataSet(env);
--- End diff --
Let's also keep this consistent. In Single Source Shortest Paths you read
fromDataSet(getDefault..., env). maybe we could do that for all the examples
> Read edges and vertices from CSV files
> --------------------------------------
>
> Key: FLINK-1520
> URL: https://issues.apache.org/jira/browse/FLINK-1520
> Project: Flink
> Issue Type: New Feature
> Components: Gelly
> Reporter: Vasia Kalavri
> Assignee: Shivani Ghatge
> Priority: Minor
> Labels: easyfix, newbie
>
> Add methods to create Vertex and Edge Datasets directly from CSV file inputs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)