Flink runs on Linux and Mac OS X.
Note: Windows users can run Flink in Cygwin or WSL.
To be able to run Flink, the only requirement is to have a working Java 8 or 11 installation.
You can check the correct installation of Java by issuing the following command:
If you have Java 8, the output will look something like this:
Download a binary from the downloads page. You can pick
any Scala variant you like. For certain features you may also have to download one of the pre-bundled Hadoop jars
and place them into the /lib directory.
Go to the download directory.
Unpack the downloaded archive.
For MacOS X users, Flink can be installed through Homebrew.
Start a Local Flink Cluster
Check the Dispatcher’s web frontend at http://localhost:8081 and make sure everything is up and running. The web frontend should report a single available TaskManager instance.
You can also verify that the system is running by checking the log files in the logs directory:
Windows Cygwin Users
If you are installing Flink from the git repository and you are using the Windows git shell, Cygwin can produce a failure similar to this one:
This error occurs because git is automatically transforming UNIX line endings to Windows style line endings when running in Windows. The problem is that Cygwin can only deal with UNIX style line endings. The solution is to adjust the Cygwin settings to deal with the correct line endings by following these three steps:
Start a Cygwin shell.
Determine your home directory by entering
This will return a path under the Cygwin root path.
Using NotePad, WordPad or a different text editor open the file .bash_profile in the home directory and append the following: (If the file does not exist you will have to create it)
Save the file and open a new bash shell.
Stop a Local Flink Cluster
To stop Flink when you’re done type:
You can terminate the processes via CTRL-C in the spawned shell windows.