[英]Spark Master vs Yarn Resource manager
How does yarn allocate resources for spark applications and how it is done when spark runs in standalone mode? yarn如何为spark应用分配资源,spark单机运行时如何分配?
You define the driver memory size, deployment mode, number of executors and their memory sizes when you run spark-submit
.您在运行
spark-submit
时定义驱动程序 memory 大小、部署模式、执行程序数量及其 memory 大小。 If no options are provided, the defaults from spark-env
and/or yarn-site.xml
are used.如果未提供任何选项,则使用
spark-env
和/或yarn-site.xml
的默认值。 Then that amount of resources will be scheduled.然后将安排该数量的资源。
If dynamic executor execution is enabled, and you're reading data from HDFS, for example, then more or less executors may start, depending on how many file blocks the data contains例如,如果启用了动态执行程序执行,并且您正在从 HDFS 读取数据,则可能会启动或多或少的执行程序,具体取决于数据包含的文件块数量
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.