- 提交任务时的几个重要参数
- executor-cores——每个executor使用的内核数,默认为1,官方建议为2-5个。
- num-executors——启动executor的数量,默认为2。
- executor-memory——executor内存大小默认1G。
- driver-cores——driver使用内核数,默认一个。
- driver-memory——driver内存大小,默认512M。
- 样例
spark-submit \
--master local[5] \
--driver-cores 2 \
--driver-memory 8g \
--executor-cores 4 \
--num-executors 10 \
--executor-memory 8g \
--class PackageName.ClassName XXXX.jar \
--name "Spark Job Name" \
InputPath \
OutputPath