Package org.apache.flink.examples.java.graph.ConnectedComponents

Examples of org.apache.flink.examples.java.graph.ConnectedComponents.UndirectEdge


       
    // read vertex and edge data
    DataSet<Tuple1<Long>> vertices = env.readCsvFile(verticesPath).types(Long.class);
   
    DataSet<Tuple2<Long, Long>> edges = env.readCsvFile(edgesPath).fieldDelimiter(' ').types(Long.class, Long.class)
                        .flatMap(new UndirectEdge());
       
    // assign the initial components (equal to the vertex id)
    DataSet<Tuple2<Long, Long>> verticesWithInitialId = vertices.map(new DuplicateValue<Long>());
           
    // open a delta iteration
View Full Code Here

TOP

Related Classes of org.apache.flink.examples.java.graph.ConnectedComponents.UndirectEdge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.