Setup Apache Flink Environment Standalone on Windows | Apache Flink

Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams, for introduction about Apache Flink components please check our previous article

https://blog.datavalley.technology/2020/05/10/introduction-to-apache-flink-apache-flink/

In this article we will learn together how to setup and run Apache Flink in Standalone mode.

Run Apache Flink Standalone

Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale. Now we will run Apache Flink Standalone.

Requirement

The following components needs to be ready before we start the installation and setup of Apache Flink

Java

The only requirement for all OS is machine must have a working java 8 or 11 installed. To check if java run in your machine or not execute this command:

java -version

WSL

Flink runs on Linux and Mac OS, Windows users can run Flink in Cygwin or WSL. So, if you want to run Flink on Windows, you should install WSL or Windows Subsystem for Linux. follow next steps to setup WSL on windows:

1- Go to Settings > Update & Security >

2- Select For Developers from the left menu. Check the Developer Mode radio button

3- Go back to Windows Settings, then search for “Windows Features”, choose “Turn Windows features on or off”. Scroll to find Windows Subsystem for Linux, check the box, and then install it.

Once done, one has to reboot to finish installing the requested changes. Press Restart now. Then go to Microsoft Store and install ubuntu or any other Linux distorts.

Download Flink

    • For Windows, Linux and Ubuntu:

        • Download a binary from the downloads page. You can pick any Scala variant you like.
        • Go to the download directory.
        • Extract the download archive.
    • for Mac: 

      • For MacOS X users, Flink can be installed through Homebrew , Or follow the following commands
$ brew install apache-flink
$ flink --version

Run Flink

    • For Windows:

      • Go to This PC > properties
      • Advanced System settings > Environments variable
      • Add new variable
        • Variable name –> ‘Flink_Home
        • Variable value –> Path flink folder location
      • Go to System Path and add these two paths
        • <flink folder location> bin
        • <flink folder location>lib
      • Open Ubuntu or any Linux distorts installed in your machine, and Execute this command.
$ cd mnt <flink folder location>bin
$ bash start-cluster.sh
    • For others OS

      • Execute this command
$ cd mnt <flink folder location>bin
$ bash start-cluster.sh

Check the Dispatcher’s web frontend at http://localhost:8081

Facebook
Twitter

Unlimited access to educational materials for subscribers

Ask ChatGPT
Set ChatGPT API key
Find your Secret API key in your ChatGPT User settings and paste it here to connect ChatGPT with your Tutor LMS website.
Hi, Welcome back!
Forgot?
Don't have an account?  Register Now