I've been working on expanding the Apache Flink Python API to better match the Java API and I get weird errors about the types of the data I am working on. Is there a way to attach a Java debugger (e.g. Intellij IDEA) to debug Flink itself?
Asked
Active
Viewed 6,460 times
5
-
2Yes it's possible. Google for "Java Remote debug command line" – Svetlin Zarev Jun 06 '16 at 14:09
1 Answers
6
Thanks to Svetlin Zarev for pointing out remote Java debugging. Here are some helpful things I should've found before asking:
- Set up remote debugging in IDE/debugger/whatever e.g. for IntelliJ IDEA
- Modify Apache Flink JVM arguments by setting env.java.opts in the configuration using the appropriate settings for remote debugging
Or to debug Flink job runners, set up remote debugging and run the job using bin/flink
with JVM_ARGS
set in your environment. Make sure to set JVM_ARGS
only for bin/flink
and not for the Flink job manager (i.e. bin/start-local.sh
) or the ports will clash.
I've made a little fish shell function that wraps Flink job run so that the proper arguments are set here.