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 


---
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.
---

Reply via email to