Reputation: 43
I am new to the Flink world and wanted to debug the Flink Job line by line by putting be breakpoints inside the SensorTimeAssigner and AvegrageTemperatureWindow Function classes. Followed this article Flink Setup
Please help me out to debug the FLink job in IntelliJ IDE.
io.github.streamingwithflink.chapter1.AverageSensorReadings.java
Upvotes: 2
Views: 1075
Reputation: 43439
As the article indicates, you need to import your Flink project into IntelliJ, and then you can debug it like any other application, by setting breakpoints.
When you do this you are not using a separate Flink cluster, but rather all of Flink's services are running inside the same JVM as your application -- so the Flink client, job manager, and task manager all running together, inside IntelliJ.
One thing you'll have to pay attention to, and this has become a bit more difficult to find in recent versions of IntelliJ, is to modify your run configuration so that you turn on Include dependencies with "Provided" scope. You'll find this under Run / Edit Configurations / Modify options / Java.
Upvotes: 1