Triggers the program execution. The environment will execute all parts of the program that have resulted in a "sink" operation. Sink operations are for example printing results ( {@link DataSet#print()}, writing results (e.g. {@link DataSet#writeAsText(String)}, {@link DataSet#write(org.apache.flink.api.common.io.FileOutputFormat,String)}, or other generic data sinks created with {@link DataSet#output(org.apache.flink.api.common.io.OutputFormat)}.
The program execution will be logged and displayed with a generated default name.
@return The result of the job execution, containing elapsed time and accumulators.
@throws Exception Thrown, if the program executions fails.
DataSet<Tuple2<Long, Long>> result = initialVertices.runOperation(VertexCentricIteration.withPlainEdges(edges, new CCUpdater(), new CCMessager(), 100));
result.print();
env.execute("Spargel Connected Components");
}
public static final class CCUpdater extends VertexUpdateFunction<Long, Long, Long> {
@Override
public void updateVertex(Long vertexKey, Long vertexValue, MessageIterator<Long> inMessages) {
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.