![Apache Flink Tutorial](/apache_flink/images/apache-flink-mini-logo.jpg)
- Apache Flink Tutorial
- Apache Flink - Home
- Apache Flink - Big Data Platform
- Batch vs Real-time Processing
- Apache Flink - Introduction
- Apache Flink - Architecture
- Apache Flink - System Requirements
- Apache Flink - Setup/Installation
- Apache Flink - API Concepts
- Apache Flink - Table API and SQL
- Creating a Flink Application
- Apache Flink - Running a Flink Program
- Apache Flink - Libraries
- Apache Flink - Machine Learning
- Apache Flink - Use Cases
- Apache Flink - Flink vs Spark vs Hadoop
- Apache Flink - Conclusion
- Apache Flink Resources
- Apache Flink - Quick Guide
- Apache Flink - Useful Resources
- Apache Flink - Discussion
Apache Flink - Running a Flink Program
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](/apache_flink/images/flink_home_directory.jpg)
Go to Flink dashboard, you will be able to see a completed job with its details.
![Flink dashboard](/apache_flink/images/flink_dashboard.jpg)
If you click on Completed Jobs, you will get detailed overview of the jobs.
![Click Completed Jobs](/apache_flink/images/click_completed_jobs.jpg)
To check the output of wordcount program, run the below command in the terminal.
cat output.txt
![Output Wordcount Program](/apache_flink/images/output_wordcount_program.jpg)
Advertisements