1. IDEA配置remote debug:
2. 客户端设置监听:
export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9001"
3. 客户端提交任务(启动Spark),可以看到监听生效:
Listening for transport dt_socket at address: 9001
4. IDEA中开启remote debug,打断点,调试进入即可。