如何为spark应用计算分配的资源(Allocated Memory)?

时间:2017-12-11 08:32:24

标签: hadoop apache-spark yarn

正如我们所知,提交spark应用程序时,集群将分配资源来运行它,但是如何计算应用程序所需的默认配置的总分配内存?

application history for hadoop yarn cluster

1 个答案:

答案 0 :(得分:2)

火花作业的总分配内存可以通过公式

给出
Total Memory =  memory required by the driver + the memory used by executors * number of executors

提交spark作业时,通常会指定driver_memory,num_executors和executor_memory。

如果你没有指定spark放置defaut值。 spark的默认值可以在conf / spark-defaults.conf中找到。检查here

相关问题