Gelly is a Graph API for Flink. It contains a set of methods and utilities which aim to simplify the development of graph analysis applications in Flink. In Gelly, graphs can be transformed and modified using high-level functions similar to the ones provided by the batch processing API. Gelly provides methods to create, transform and modify graphs, as well as a library of graph algorithms.
Gelly is currently part of the libraries Maven project. All relevant classes are located in the org.apache.flink.graph package.
Add the following dependency to your pom.xml to use Gelly.
Note that Gelly is not part of the binary distribution. See linking for
instructions on packaging Gelly libraries into Flink user programs.
The remaining sections provide a description of available methods and present several examples of how to use Gelly and how to mix it with the Flink DataSet API.
Running Gelly Examples
The Gelly library jars are provided in the Flink distribution
in the opt directory (for versions older than Flink 1.2 these can be manually downloaded from
Maven Central). To run the Gelly examples the flink-gelly (for
Java) or flink-gelly-scala (for Scala) jar must be copied to Flink’s lib directory.
Gelly’s examples jar includes drivers for each of the library methods and is provided in the examples directory.
After configuring and starting the cluster, list the available algorithm classes:
The Gelly drivers can generate graph data or read the edge list from a CSV file (each node in a cluster must have access
to the input file). The algorithm description, available inputs and outputs, and configuration are displayed when an
algorithm is selected. Print usage for JaccardIndex: