On this tutorial we will discuss how to install Apache Flink version 1.12.0 on Ubuntu 20.04 LTS and run a simple example of how Apache Flink is running.
Beside Apache Kafka and Spark which are known as stream processing framework, there is an Apache Flink which is running as distributed streaming data-flow engine. Apache Flink is executing arbitrary dataflow programs in a data-parallel and pipelined (hence task parallel) manner. Flink’s pipelined runtime system enables the execution of bulk/batch and stream processing programs. Flink is written in Java and Scala. On this article we will discuss how to install Apache Flink on Ubntu 20.04 LTS.
Apache Flink provides data-source and sink connectors to systems such as Amazon Kinesis, Apache Kafka, Alluxio, HDFS, Apache Cassandra, and ElasticSearch where Apache Flink does not provide its own data-storage system.
Apache Flink Installation On Ubuntu 20.04 LTS
Apache Flink runs on Linux, Mac OS X, and Windows. To be able to run Flink, the only requirement is to have a working Java 8.x or higher instaled on the system. On this tutorial we will use the latest stable of Apache Flink, release is 1.12.0 which was launched on 15 September 2020.
Before starting the installation process, we have to make sure ifJava is installed on our system first. To verify this requirement we will query the Java version on our system by submitting command line :
ramans@otodiginet:~$ java --version openjdk 18.104.22.168 2020-11-04 OpenJDK Runtime Environment (build 22.214.171.124+1-Ubuntu-0ubuntu1.20.04) OpenJDK 64-Bit Server VM (build 126.96.36.199+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
The Apache Flink installation will be consist of several steps, namely :
- Download Flink binary file
- Unpack the downloaded file
- Start a Local Flink Cluster
Download Flink binary file
We have to Download Flink binary from the downloads page. We can pick any Scala variant as we like. For certain features you may also have to download one of the pre-bundled Hadoop jars and place them into the /lib directory.
By using wget command line, we will dowload the Flink source file, we will submit the command line :
ramans@otodiginet:~$ wget https://downloads.apache.org/flink/flink-1.12.0/flink-1.12.0-bin-scala_2.12.tgz
Unpack the downloaded file
After downloading was completed done, than we will exctrac the file inside current directory by submitting command line :
tar xzf flink-*.tgz.
ramans@otodiginet:~$ ls -ltr flink* -rw-rw-r-- 1 ramans ramans 324168609 Dec 2 02:19 flink-1.12.0-bin-scala_2.12.tgz ramans@otodiginet:~$ tar xzf flink-*.tgz
Start a Local Flink Cluster
We will move to flink-1.12.0 directory inside extracted directory, then submit the executable file to run the loca Flink Cluster.
ramans@otodiginet:~$ cd flink-1.12.0/ ramans@otodiginet:~/flink-1.12.0$ ./bin/start-cluster.sh Starting cluster. Starting standalonesession daemon on host otodiginet. Starting taskexecutor daemon on host otodiginet.
The Apache Flink web frontend can be accessed at http://localhost:8081. We can monitor and make sure everything is up and running. The web frontend should report a single available TaskManager instance.
The Apache Flink version 1.12.0 installation on Ubuntu 20.04 LTS has been completed done, successfully. For more information about Apache Flink can be found on Apache Flink official website. Have a nice day, keep safe and stay at home.