- All Implemented Interfaces:
- org.apache.flink.api.common.ProgramDescription
public class GraphMetrics
extends Object
implements org.apache.flink.api.common.ProgramDescription
This example illustrates how to use Gelly metrics methods and get simple statistics
from the input graph.
The program creates a random graph and computes and prints
the following metrics:
- number of vertices
- number of edges
- average node degree
- the vertex ids with the max/min in- and out-degrees
The input file is expected to contain one edge per line,
with long IDs and no values, in the following format:
"<sourceVertexID>\t<targetVertexID>".
If no arguments are provided, the example runs with a random graph of 100 vertices.