spark shell debug
spark-shell --conf 'spark.driver.extraJavaOptions=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000'
spark-sql Driver debug
spark-sql --conf 'spark.driver.extraJavaOptions=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000'
spark-sql Executor debug
spark-sql --conf 'spark.executor.extraJavaOptions=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000' \
--conf spark.dynamicAllocation.enabled=false \
--conf spark.executor.instances=1
在YARN 上执行测试用例
spark-sql --master yarn -e "select count(distinct c1) from (select 1 c1)t"