推薦大家去看原文博主的文章,條理清晰閱讀方便,轉載是爲了方便以後個人查閱
https://www.jianshu.com/p/5c388fd29806
1.在提交任務時的幾個重要參數
executor-cores:每個executor使用的內核數,默認爲1
num-executors:啓動executors的數量,默認爲2
executor-memory:executor內存大小,默認爲1G
driver-cores:driver使用內核數,默認爲1
driver-memory:driver內存大小,默認爲512M
2.提交任務的樣式
/usr/local/spark/bin/spark-submit
--master local[5]
--driver-cores 2
--driver-memory 8g
--executor-cores 4
--num-executors 10 \
--executor-memory 8g
--class cn.spark.sparktest.core.WordCountCluster
--name "Spark job Name"
Input Path
OutputPath
參數調優可參考:https://blog.csdn.net/gamer_gyt/article/details/79135118