通用可选参数:
- --master
MASTER_URL, 可 以 是 spark://host:port, mesos://host:port, yarn, yarn-cluster,yarn-client, local
- --deploy-mode
DEPLOY_MODE, Driver 程序运行的地方,client 或者 cluster,默认是client。
- --class
CLASS_NAME, 主类名称,含包名
- --jars
逗号分隔的本地 JARS, Driver 和 executor 依赖的第三方 jar 包
- --files
用逗号隔开的文件列表,会放置在每个 executor 工作目录中
- --conf
spark 的配置属性
- --driver-memory
Driver 程序使用内存大小(例如:1000M,5G),默认 1024M
- --executor-memory
每个 executor 内存大小(如:1000M,2G),默认 1G
Spark standalone with cluster deploy mode only:
- --driver-cores
Driver 程序的使用 core 个数(默认为 1),仅限于 Spark standalone模式
Spark standalone or Mesos with cluster deploy mode only:
- --supervise
失败后是否重启 Driver,仅限于 Spark alone 或者 Mesos 模式
Spark standalone and Mesos only:
- --total-executor-cores
executor 使用的总核数,仅限于 SparkStandalone、Spark on Mesos模式
Spark standalone and YARN only:
- --executor-cores
每个 executor 使用的 core 数,Spark on Yarn 默认为 1,standalone 默认为 worker 上所有可用的 core。
YARN-only:
- --driver-cores
driver 使用的 core,仅在 cluster 模式下,默认为 1。
- --queue
QUEUE_NAME 指定资源队列的名称,默认:default
- --num-executors
一共启动的 executor 数量,默认是 2 个。