Spark在shell中调试


将要调试的程序打包,上传到服务器目录,/home/hadoop/test/test.jar

然后在脚本中指定--jars参数为该目录。

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