recipes
recipes copied to clipboard
The Immerok Apache Flink Cookbook is a collection of examples of Apache Flink applications in the format of "recipes". Each recipe explains how you can solve a specific problem by leveraging one or mo...
Recipes
Each recipe is a self-contained module.
Recipe overview
- Deserializing JSON from Kafka -> Detailed explanation
- Continuously Reading CSV Files -> Detailed explanation
- Exactly-once with Apache Kafka® -> Detailed explanation
- Writing an Application in Kotlin™ -> Detailed explanation
- Joining and Deduplicating Data -> Detailed explanation
- Splitting Apache Kafka® events -> Detailed explanation
- Capturing Late Data -> Detailed explanation
- Creating Dead Letter Queues -> Detailed explanation
- Using Session Windows -> Detailed explanation
- Serializing Timestamped Data -> Detailed explanation
- Reading Apache Kafka Headers -> Detailed explanation
- Upgrading Flink (Table API) -> Detailed explanation
- Alerting when Problems Persist -> Detailed explanation
- Migrating state away from Kryo -> Detailed explanation
Requirements
- Maven
- Java 11
IDE setup
Spotless
These instructions assume you use IntelliJ IDEA.
- Install the latest version of the google-java-format plugin
- Note: For the time being the custom version used in Flink development is also fine.
- Enable the google-java-format as explained here
- Settings/Preferences -> Editor -> Code style
- Tick "Enabled Editorconfig support"
- Scala/Kotlin -> Imports -> Clear the import layout at the bottom
- This is only relevant for the Scala/Kotlin recipes; you can likely skip this and just call spotless from the command-line
- Settings/Preferences -> Tools -> Actions on Save
- Enable "Reformat code" and select Java/Scala/Kotlin file types
- Enable "Optimize imports"
Note: You can also run mvn spotless:apply
on the command-line / IDE to reformat the code.