spark-submit常用参数

yarn模式默认启动2个executor,无论你有多少的worker节点
standalone模式每个worker一个executor,无法修改executor的数量


partition是RDD中的一个dataset,一般默认都是2个
executor中的task数量由partition数(最后一个stage的partition数)决定



Options:

  --master MASTER_URL                   选择运行模式,spark://host:port, mesos://host:port, yarn, or local.
  --deploy-mode DEPLOY_MODE    将driver运行在本地(client)或其他worker节点上(cluster) (Default: client).
  --class CLASS_NAME                     程序主类名
  --name NAME                                    应用名
  --jars JARS                                         driver和executor都需要的包,多个包之间用逗号(,)分割
  --properties-file FILE                         读取的环境变量文件位置,默认读取的位置为conf/spark-defaults.conf
  --driver-memory MEM                      driver使用的内存(e.g. 1000M, 2G) (Default: 512M).
  --driver-class-path                             driver所依赖的包,多个包之间用冒号(:)分割

  --executor-memory MEM                 每个executor使用的内存 (e.g. 1000M, 2G) (Default: 1G).


Spark standalone with cluster deploy mode only:
  --driver-cores NUM                           diver使用的 核心数(Default: 1).
  --supervise                                        重启失败的driver
  --kill SUBMISSION_ID                     删掉指定的driver

  --status SUBMISSION_ID               返回指定的driver状态


Spark standalone and Mesos only:

  --total-executor-cores NUM            所有executors使用的核心总数


YARN-only:
  --driver-cores NUM                        diver使用的 核心数(只用于cluster),(Default: 1)                      
  --executor-cores NUM                   每个executor使用的核心数 (Default: 1).
  --queue QUEUE_NAME               提交到yarn上的队列名 (Default: "default").
  --num-executors NUM                   启动的executor的数量 (Default: 2).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值