Search code examples
scalaapache-flink

Do I need a JAR file to run a Flink application?


I am working through the book Stream Processing with Apache Flink by Fabian Hueske and Vasiliki Kalavri.

The book includes an example Flink application and I want to figure out how to run the file. It is a scala file located here in their github repo.

Must I turn it into a JAR file before I run it? If so, how do I convert the file to JAR?


Solution

  • Except for SQL queries submitted with Flink‘s SQL client, a user needs to package a JAR file. Usually, a Flink program file can be packaged using a Maven or Gradle project:

    https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/datastream/project-configuration/#maven-quickstart