将需要调试的程序打包并上传到服务器目录/home/hadoop/test/test.jar[en]Package the program to be debugged and upload it to the server directory, / home/hadoop/test/test.jar
然后在脚本中为该目录指定–jars参数。[en]Then specify the– jars parameter to this directory in the script.
spark-shell --master yarn \
--queue prod \
--driver-memory 10G --executor-memory 10G --num-executors 50 --executor-cores 2 \
--jars /home/hadoop/test/test.jar \
--conf spark.driver.maxResultSize=20G \
--conf spark.port.maxRetries=16 \
--conf spark.executor.memoryOverhead=5120 \
--conf spark.dynamicAllocation.enabled=false \
--conf spark.executor.extraClassPath=$HADOOP_PATH/lib/native \
--conf spark.driver.extraClassPath=$HADOOP_PATH/lib/native \
--name testSparkShell
Original: https://www.cnblogs.com/30go/p/16217934.html
Author: 硅谷工具人
Title: Spark在shell中调试
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/6004/
转载文章受原作者版权保护。转载请注明原作者出处!