In this tutorial, we will go through the introduction of the Apache Flink Gelly that is the graph API of Flink used for graph processing also we will see the various types of Algrothism that can be used for Graph processing.


What is Apache Flink Gelly Graph API?

Apache Flink Gelly is the graph processing API that is used to perform the analysis of graph applications using standard sets of utilities and methods. It uses high-level functions to perform the transformation and modification of Graphs. Apache provides other frameworks as well for graph processing such as Apache Giraph but Gelly works on top of Apache Flink and uses a single API.

Apache Flink Gelly supports various types of Algrothism that are used to perform different types of operations.

  • AdamicAdar
  • ClusteringCoefficient
  • ConnectedComponents
  • EdgeList
  • GraphMetrics
  • HITS
  • JaccardIndex
  • PageRank
  • TriangleListing

We will use the following commands to start the Apache Flink cluster and then copy the Gelly JAR file from /opt directory to /lib directory of filnk and then we will see the usage of Algrothism.

cloudduggu@ubuntu:~/flink$ cp opt/flink-gelly* lib/

cloudduggu@ubuntu:~/flink$ ./bin/start-cluster.sh

cloudduggu@ubuntu:~/flink$ ./bin/flink run examples/gelly/flink-gelly-examples_*.jar

flink gelly program example

We will use the following command to check the detail of the algorithm and its usage. In the below example we can see the detail about the "JaccardIndex" algorithm, its usage, configuration, inputs, and so on.

cloudduggu@ubuntu:~/flink$ ./bin/flink run examples/gelly/flink-gelly-examples_*.jar --algorithm JaccardIndex

flink algrothism use