eclipse - Debugging Spark Applications -


i trying debug spark application on cluster using master , several worker nodes. have been successful @ setting master node , worker nodes using spark standalone cluster manager. downloaded spark folder binaries , use following commands setup worker , master nodes. these commands executed spark directory.

command launching master

./sbin/start-master.sh 

command launching worker node

./bin/spark-class org.apache.spark.deploy.worker.worker master-url 

command submitting application

./sbin/spark-submit --class application --master url ~/app.jar 

now, understand flow of control through spark source code on worker nodes when submit application(i want use 1 of given examples use reduce()). assuming should setup spark on eclipse. eclipse setup link on apache spark website seems broken. appreciate guidance on setting spark , eclipse enable stepping through spark source code on worker nodes.

thanks!

it's important distinguish between debugging driver program , debugging 1 of executors. require different options passed spark-submit

for debugging driver can add following spark-submit command. set remote debugger connect node launched driver program on.

--driver-java-options -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 

in example port 5005 specified, may need customize if running on port.

connecting executor similar, add following options spark-submit command.

--num-executors 1 --executor-cores 1 --conf "spark.executor.extrajavaoptions=-agentlib:jdwp=transport=dt_socket,server=n,address=wm1b0-8ab.yourcomputer.org:5005,suspend=n" 

replace address local computer's address. (it's idea test can access spark cluster).

in case, start debugger in listening mode, start spark program , wait executor attach debugger. it's important set number of executors 1 or multiple executors try connect debugger, causing problems.

these examples running sparkmaster set yarn-client although may work when running under mesos. if you're running using yarn-cluster mode may have set driver attach debugger rather attaching debugger driver, since won't know in advance node driver executing on.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -