Flink : Running your first flink program

DevTechie
DevTechie
Published in
5 min readAug 30, 2024

--

We have seen in one of the previous articles as how to get up and running with flink. Few of the student faced problems with flink installation because of Java, so I decided to take a new system and try it myself. In this article, we will see some common problem I encountered and its solution. We will then run our first flink program from the examples that come with flink. So without further ado, let’s get going.

Open up the terminal. After downloading flink and applying below would create a flink directory. At the time of writing this article flink 1.20.0 is the latest version that is downloaded.

(base) xxx@devtechies-mbp Downloads % tar xzf flink-1.20.0-bin-scala_2.12.tar

We can check the flink directory

(base) xxx@devtechies-mbp Downloads % ls -lt|head -5

This shows me directory name flink-1.20.0. When starting the cluster as shown below we get some error

(base) xxx@devtechies-mbp Downloads % cd flink-1.20.0
(base) xxx@devtechies-mbp flink-1.20.0 % ls
(base) xxx@devtechies-mbp flink-1.20.0 % ./bin/start-cluster.sh

Executing above gave me below set of errors

/Users/xxx/Downloads/flink-1.20.0/bin/config.sh: line 288: > 17 : syntax error: operand expected (error token is "> 17 ")
Starting cluster…

--

--