0

Is it possible to connect to a live Java-spark application and debug it using something similar to how you debug a Tomcat web service (for tomcat debug mode, for example: catalina jpda start)?

The goal is being able to attach to the java-spark micro-service and step through the source code while it's running.

Thanks!

Morkus
  • 517
  • 7
  • 21
  • 1
    Possible duplicate of [How can I debug spark application locally?](http://stackoverflow.com/questions/30403685/how-can-i-debug-spark-application-locally) – JiriS Apr 11 '17 at 11:01
  • 1
    @JiriS i think the author is interested in the spark framework, not apache spark. Morkus, correct me if i am wrong. – Yevgeniy Apr 11 '17 at 11:58

3 Answers3

1

you debug a java-spark application just like you would debug any other Java application. Take a look here

Community
  • 1
  • 1
Yevgeniy
  • 2,614
  • 1
  • 19
  • 26
1

A standard Java debugger is the most powerful, but you there is also a dedicated project which provides a debug-page: https://github.com/perwendel/spark-debug-tools

tipsy
  • 402
  • 4
  • 15
0

I'd write a Junit test that calls your function / class that you want to debug, take a sample of the input data that you believe is causing the issue and make that your input. Step through the code line by line, add in lots of shows :)

Larking
  • 17
  • 4