| 用途 | 提交 Spark 应用(Scala/Java/Python) |
|---|---|
| 资源参数 | --num-executors / --executor-cores / --executor-memory |
| 其他 | --jars 依赖、--files 分发文件、--conf 任意配置 |
提交到 YARN 集群
提交到 YARN 集群
spark-submit \
--master yarn \
--deploy-mode cluster \
--queue root.etl \
--num-executors 8 --executor-cores 4 --executor-memory 8g \
--conf spark.sql.shuffle.partitions=400 \
--class com.example.OrdersJob \
app.jar --dt 2026-10-11应用参数必须写在 jar 之后;写在 spark-submit 选项区会被当成 Spark 自己的参数解析失败。