5 Steps to Setup Apache Flink on Ubuntu 20.04 LTS

Apache flink is a free & open source framework and distributed processing engine It helps to run in all common cluster  environments, perform computations at in-memory speed and at any scale. It provides data-source and sink connectors to systems such as Amazon Kinesis, Apache Cassandra, and Elastic Search where Flink does not provide its own data-storage system.

There are few steps to setup apache flink on ubuntu:

Step 1: Update the System.

apt-get update

Step 2: Install Java on system.

apt install openjdk-11-jdk

  • Check the Java version.

java --version

  • Here is the command output.

openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Step 3: Download the Apache flink.

wget https://dlcdn.apache.org/flink/flink-1.14.0/flink-1.14.0-bin-scala_2.12.tgz

  • Here is the command output.

root@ip-172-31-39-58:/home/ubuntu# wget https://dlcdn.apache.org/flink/flink-1.14.0/flink-1.14.0-bin-scala_2.12.tgz
--2021-10-29 08:10:09-- https://dlcdn.apache.org/flink/flink-1.14.0/flink-1.14.0-bin-scala_2.12.tgz
Resolving dlcdn.apache.org (dlcdn.apache.org)... 151.101.2.132, 2a04:4e42::644
Connecting to dlcdn.apache.org (dlcdn.apache.org)|151.101.2.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 340089072 (324M) [application/x-gzip]
Saving to: ‘flink-1.14.0-bin-scala_2.12.tgz’
flink-1.14.0-bin-scala_2.12.tgz 100%[===========================================================================================>] 324.33M 113MB/s in 2.9s
2021-10-29 08:10:38 (113 MB/s) - ‘flink-1.14.0-bin-scala_2.12.tgz’ saved [340089072/340089072]

  • Extract the downloaded folder.

tar xzf flink-1.14.0-bin-scala_2.12.tgz

Step 4: Change the directory & Start the flink cluster.

cd flink-1.14.0
./bin/start-cluster.sh

  • Here is the command output.

root@ip-172-31-39-58:/home/ubuntu# cd flink-1.14.0
root@ip-172-31-39-58:/home/ubuntu/flink-1.14.0# ./bin/start-cluster.sh
Starting cluster.
Starting standalonesession daemon on host ip-172-31-39-58.
Starting taskexecutor daemon on host ip-172-31-39-58.

Step 5: Open Apache Flink web interface.

http://server-ip:8081

  • Here is the output.
  • Apache Flink is Ready.

  • Click on Job Manager.

Leave a Reply