Apache Flink - Running a Flink Program


Advertisements

In this chapter, we will learn how to run a Flink program.

Let us run the Flink wordcount example on a Flink cluster.

Go to Flink's home directory and run the below command in the terminal.

bin/flink run examples/batch/WordCount.jar -input README.txt -output /home/ubuntu/flink-1.7.1/output.txt
Flink Home Directory

Go to Flink dashboard, you will be able to see a completed job with its details.

Flink dashboard

If you click on Completed Jobs, you will get detailed overview of the jobs.

Click Completed Jobs

To check the output of wordcount program, run the below command in the terminal.

cat output.txt
Output Wordcount Program
Advertisements