我的 spark 作业在 aws EMR 集群上长时间处于接受模式

Posted

技术标签:

【中文标题】我的 spark 作业在 aws EMR 集群上长时间处于接受模式【英文标题】:My spark jobs are staying long time in accepted mode on aws EMR cluster 【发布时间】:2022-01-09 00:04:48 【问题描述】:

。以前我的火花工作在接受模式下停留的时间更少,现在它增加了。以下是我正在使用的一些配置,让我知道是否需要调查任何配置。谢谢。

<property>
<name>yarn.scheduler.maximum-allocation-vcores</name>
<value>64</value>
<final>false</final>
<source>yarn-site.xml</source>
</property>
<property>
<name>yarn.nodemanager.disk-health-checker.min-free-space-per-disk-mb</name>
<value>0</value>
<final>false</final>
<source>yarn-default.xml</source>
</property>
<property>
<name>yarn.resourcemanager.nodemanagers.heartbeat-interval-ms</name>
<value>250</value>
<final>false</final>
<source>yarn-site.xml</source>
</property>
<property>
<name>yarn.scheduler.maximum-allocation-vcores</name>
<value>64</value>
<final>false</final>
<source>yarn-site.xml</source>
</property>
<property>
<name>yarn.client.application-client-protocol.poll-interval-ms</name>
<value>200</value>
<final>false</final>
<source>yarn-default.xml</source>
</property>
<property>
<name>yarn.timeline-service.client.retry-interval-ms</name>
<value>1000</value>
<final>false</final>
<source>yarn-default.xml</source>
</property>
<property>
<name>yarn.timeline-service.client.best-effort</name>
<value>false</value>
<final>false</final>
<source>yarn-default.xml</source>
</property>
<property>
<name>yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage</name>
<value>90.0</value>
<final>false</final>
<source>yarn-default.xml</source>
</property>
<property>
<name>yarn.app.mapreduce.am.resource.cpu-vcores</name>
<value>1</value>
<final>false</final>
<source>mapred-default.xml</source>
</property>
<property>
<name>yarn.sharedcache.store.in-memory.check-period-mins</name>
<value>720</value>
<final>false</final>
<source>yarn-default.xml</source>
</property>

【问题讨论】:

【参考方案1】:

如果您的工作花费了很长时间,但这是一个很好的指标,表明您的工作没有可用的可用资源来运行。

如果这是一个共享集群,请与管理员讨论获得更多资源或更好地分配给您,或者什么可能占用空间。

如果这是您的集群。考虑为你的工作要求更少的内存,你可能会更快地被接受。您可能只是要求太多,而纱线很难找到为您分配的空间。 (或通过更大的集群。)过度分配驱动程序/执行程序空间是一个非常常见的问题,因此请尝试使用 less 运行,看看会发生什么。

尝试检查资源管理器以查看正在运行的其他可能占用空间的内容: http://master-public-dns-name:8088/

【讨论】:

以上是关于我的 spark 作业在 aws EMR 集群上长时间处于接受模式的主要内容,如果未能解决你的问题,请参考以下文章

在没有 spark UI 的情况下在 AWS EMR 中监控 spark 集群

AWS EMR 火花提交选项 - 失败

使用 AWS EMR 的 ETL

带有 cloudformation 的 AWS EMR 集群:如何启用调试

从 EMR 迁移到 AWS Glue 后在 Spark SQL 中找不到表

查找我的 spark 作业输出文件的位置