Flink is designed to process continuous streams of data at a lightning-fast pace. This tutorial will guide you on how to download the latest version of Apache Flink, install, and run it.
Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments and perform computations at in-memory speed and any scale*.
Apache Flink can run on any Unix-Like environment, such as Linux, macOS, Cygwin, etc. It is required to have at least Java JDK 11 installed on your machine.
You can check the java version by typing the command below in your terminal.
openjdk 220.127.116.11 2022-08-12 LTS OpenJDK Runtime Environment Corretto-18.104.22.168.1 (build 22.214.171.124+9-LTS) OpenJDK 64-Bit Server VM Corretto-126.96.36.199.1 (build 188.8.131.52+9-LTS, mixed mode, sharing)
Check this tutorial to learn how to install Java JDK on Ubuntu -> https://www.geekbits.io/how-to-install-amazon-corretto-jdk-on-ubuntu/
Step 1 - Download Apache Flink
Next, download the latest binary release of Apache Flink from the link below and extract the archive:
Extract the archive:
tar -xzf ~/Downloads/flink-*.tgz
Navigate into the directory and list files
cd ~/Downloads/flink-** && ls -l
Some essential directories to note down include;
- bin/ directory contains the
flinkbinary as well as several bash scripts that manage various jobs and tasks
- conf/ directory contains configuration files, including
- examples/ directory contains sample applications that can be used as is with Flink
Step 2 - Start Flink Local Cluster
To start the local cluster, run the script:
Flink should start and run as a background process. You can check the status with the command:
ps aux | grep flink
To access the flink dashboard, navigate to locahost:8081
Step 2 - Stop Flink Local Cluster