使用mesos我真的可以在spark-submit中为每个节点启动一个执行程序吗?

Is it true that with mesos I can start only one executor per node in spark-submit?

我想知道在 mesos 上每个节点只能有一个执行程序是否属实?

上下文 我是 运行 一个由 5 个节点(worker)组成的集群上的 spark-submit (Spark 2.0.1) 作业,每个节点在粗粒度模式下有 80 CPU 和 512 GB 内存。

Mesos 运行 模式 部分中 Spark Running Spark on Mesos 的官方文档,说在粗粒度模式下(默认)我可以设置两个参数: spark.executor.memoryspark.executor.cores 并且 spark.cores.max/spark.executor.cores 会给我执行者的数量。

问题这是否正确?

我已经使用 spark-submit 设置玩了一个星期了,我的集群上最多可以有 5 个执行程序(1 个用于驱动程序,4 个用于实际工作)。这基于 Spark UI.

中的执行器选项卡

我看过这个 Whosebug 问题: 说的是:

In coarse-grained mode, Spark launch only one executor per host

Mastering Apache Spark Mesos 中的调度程序 部分它说

In coarse-grained mode, there is a single Spark executor per Mesos executor with many Spark tasks.

我不明白这是什么意思。每个节点是否总是只有一个 Mesos_executor,这意味着每个节点有一个 Spark_executor?

如果这一切都不是真的,我可以有更多的执行者。

问题是否有一些mesos设置限制了执行者的数量?

这不是真的(不再)。 SPARK-5095 Support launching multiple mesos executors in coarse grained mesos mode has been resolved in Spark 2.0 and according to the merged PR:

This PR implements two high-level features. These two features are co-dependent, so they're implemented both here:

  • Mesos support for spark.executor.cores
  • Multiple executors per slave