首页 > 解决方案 > 如何同时运行 2 个 EMR Spark 步骤?

问题描述

我正在尝试在 EMR 中同时运行 2 个步骤。但是,我总是让第一步运行,第二步待定。

我的部分 Yarn 配置如下:

{
    "Classification": "capacity-scheduler",
    "Properties": {
    "yarn.scheduler.capacity.resource-calculator": "org.apache.hadoop.yarn.util.resource.DominantResourceCalculator",
    "yarn.scheduler.capacity.maximum-am-resource-percent": "0.5"
    }
  }

当我在本地 Mac 上运行时,我可以在 Yarn 上以类似配置运行 2 应用程序,其中更改实际上是 spark 提交资源请求,以匹配所需的集群容量和性能。

换句话说,我的纱线被设置为运行多个应用程序。

因此,在我深入研究之前,我想知道是否真的可以让该步骤同时运行或仅串行运行?

否则是否有任何提示或特定的东西可以同时运行?

我的集群对于每个作业请求的内容都过度使用。因此我不明白为什么它不能同时运行。

标签: apache-sparkhadoop-yarnamazon-emr

解决方案


  • 是否可以同时或仅串行运行该步骤?

    • AWS 支持人员确认我们不能并行(并发)运行多个步骤,这些步骤是串行的,所以您所看到的(即处于待处理状态的第二个作业)是预期的。
  • 是否有任何提示或特定的东西可以同时运行到工作?

    • 您可以简单地将 spark-submit 放在 bash 脚本中并运行 bash 脚本,但您可能会在 AWS Web 控制台上丢失一些直接调试信息(imo 已经很慢了),您可以在spark-history server

On your local mac, you are able to run multiple YARN application in parallel because you are submitting the applications to yarn directly, whereas in EMR the yarn/spark applications are submitted through AWS's internal `command-runner.jar`, it does a bunch of other logging/bootstrapping etc to be able to see the `emr step` info on the web console.


推荐阅读