示例: spark-submit [--option value] <application jar> [application arguments]

参数名称

含义

--master MASTER_URL

yarn

--deploy-mode DEPLOY_MODE

Driver程序运行的地方:client、cluster

--class CLASS_NAME

The FQCN of the class containing the main method of the application.

For example, org.apache.spark.examples.SparkPi.

应用程序主类名称,含包名

--name NAME

应用程序名称

--jars JARS

Driver和Executor依赖的第三方jar包

--properties-file FILE

应用程序属性的文件路径,默认是conf/spark-defaults.conf

以下设置Driver

--driver-cores NUM

Driver程序使用的CPU核数(只用于cluster),默认为1

--driver-memory MEM

Driver程序使用内存大小

--driver-library-path

Driver程序的库路径

--driver-class-path

Driver程序的类路径

--driver-java-options

 

以下设置Executor

--num-executors NUM

The total number of YARN containers to allocate for this application.

Alternatively, you can use the spark.executor.instances configuration parameter.

启动的executor的数量,默认为2

--executor-cores NUM

Number of processor cores to allocate on each executor

每个executor使用的CPU核数,默认为1

--executor-memory MEM

The maximum heap size to allocate to each executor.

Alternatively, you can use the spark.executor.memory configuration parameter.

每个executor内存大小,默认为1G

--queue QUEUE_NAME

The YARN queue to submit to.

提交应用程序给哪个YARN的队列,默认是default队列

--archives ARCHIVES

 

--files FILES

用逗号隔开的要放置在每个executor工作目录的文件列表

1.部署模式概述

In YARN, each application instance has an ApplicationMaster process, which is the first container started for that application.
The application is responsible for requesting resources from the ResourceManager, and, when allocated them, instructing NodeManagers to start containers on its behalf.
ApplicationMasters obviate the need for an active client — the process starting the application can terminate and coordination continues from a process managed by YARN running on the cluster.

2.部署模式:Cluster

In cluster mode, the driver runs in the ApplicationMaster on a cluster host chosen by YARN.

This means that the same process, which runs in a YARN container, is responsible for both driving the application and requesting resources from YARN.

The client that launches the application doesn't need to continue running for the entire lifetime of the application.

Cluster mode is not well suited to using Spark interactively.

Spark applications that require user input, such as spark-shell and pyspark, need the Spark driver to run inside the client process that initiates the Spark application.

3.部署模式:Client

In client mode, the driver runs on the host where the job is submitted.

The ApplicationMaster is merely present to request executor containers from YARN.

The client communicates with those containers to schedule work after they start:

4.参考文档:

https://www.cloudera.com/documentation/enterprise/5-4-x/topics/cdh_ig_running_spark_on_yarn.html

http://spark.apache.org/docs/1.3.0/running-on-yarn.html

转载于:https://www.cnblogs.com/liugh/p/6953010.html

spark-submit参数说明--on YARN相关推荐

  1. spark:spark-submit 提交任务及参数说明(yarn)

    Spark:对于提交命令的理解: https://blog.csdn.net/weixin_38750084/article/details/106973247 spark-submit 可以提交任务 ...

  2. zeppelin报错master is set as yarn, but spark.submit.deployMode is not specified

    具体报错如下: java.lang.RuntimeException: master is set as yarn, but spark.submit.deployMode is not specif ...

  3. Spark On Yarn --jars/spark.yarn.jars 踩坑 与 提升spark submit速度

    一.引言 Spark submit 可以选择 --jars 传入本地的jar也可以 --jars 传入HDFS的jar包,经过半下午的实验,终于搞清了两者的关系以及 spark.yarn.jars 和 ...

  4. 平台搭建---Spark提交应用程序---Spark Submit提交应用程序及yarn

    本部分来源,也可以到spark官网查看英文版. spark-submit 是在spark安装目录中bin目录下的一个shell脚本文件,用于在集群中启动应用程序(如***.py脚本):对于spark支 ...

  5. spark submit参数及调优

    spark submit参数及调优 原文地址 spark submit参数介绍 你可以通过spark-submit --help或者spark-shell --help来查看这些参数. 使用格式:  ...

  6. spark submit参数及调优(转载)

    spark submit参数介绍 你可以通过spark-submit --help或者spark-shell --help来查看这些参数. 使用格式:  ./bin/spark-submit \--c ...

  7. spark submit参数及调试

    原文:http://www.cnblogs.com/haoyy/p/6893943.html spark submit参数介绍 你可以通过spark-submit --help或者spark-shel ...

  8. Spark Submit提交及参数调优

    https://www.cnblogs.com/LHWorldBlog/p/8414342.html https://www.cnblogs.com/haoyy/p/6893943.html spar ...

  9. Spark:spark submit参数及调优 perfect

    先看下spark运行原理流程: 我们使用spark-submit提交一个Spark作业之后,这个作业就会启动一个对应的Driver进程. 根据你使用的部署模式(deploy-mode)不同,Drive ...

  10. 【原创】大数据基础之Spark(1)Spark Submit即Spark任务提交过程

    Spark2.1.1 一 Spark Submit本地解析 1.1 现象 提交命令: spark-submit --master local[10] --driver-memory 30g --cla ...

最新文章

  1. php soap模块的安装
  2. R语言PCA主成分分析(Principle Component Analysis)实战1
  3. 花信年华--You're gonna love who you turn out to be
  4. Mysql中行转列和列转行
  5. 基于vue开发简易备忘录,实现列表增删
  6. css3 圣诞红包雨效果
  7. oracle共享池使用率,oracle调优之--共享池使用问题(摘自文平书)
  8. 我国计算机发展的四个阶段,计算机发展历程.ppt
  9. 【C语言】之实现查找重复元素
  10. 2021-06-16 srm平台电子化采购的优势
  11. 如何查看计算机网络日志,电脑系统日志怎么查看 电脑怎么查看使用记录
  12. 2021上海酵素展暨中国酵素节资讯食用酵素的营养功效及研究进展
  13. 一文了解RT8059GJ5
  14. win10c语言关机,win10如何设置定时关机?
  15. 传奇服务器限时npc修改,小小方法添加传奇服务器技能兑换NPC
  16. ViewPager中显示图片和播放视频填坑之旅
  17. Done! Done! Done! DONE ~..
  18. 所谓的SaaS服务到底是什么?
  19. python matplotlib绘制伯德图
  20. 一分钟搞明白什么是维度,什么是事实,什么是度量,什么是粒度

热门文章

  1. 【ASP.NET Core】EF Core 模型与数据库的创建
  2. RabbitMq简单应用
  3. Maven实践:版本管理 SNAPSHOT
  4. 硬件工程师笔试常见问题
  5. C# Label显示多行文本及换行(WinForm/WebForm)
  6. loadrunner中变量和参数之间的转化实例
  7. 30多条mysql数据库优化方法,千万级数据库记录查询轻松解决
  8. linux-文件权限与目录配置
  9. IOS学习笔记(九)之UIAlertView(警告视图)和UIActionSheet(操作表视图)基本概念和使用方法...
  10. admin密码对应的MD5值,16位和32位,admin解密自己留着方便.