YARN 无法识别增加的 'yarn.scheduler.maximum-allocation-mb' 和 'yarn.nodemanager.resource.memory-mb' 值

YARN doesn't recognize increased 'yarn.scheduler.maximum-allocation-mb' and 'yarn.nodemanager.resource.memory-mb' values

我正在使用一个使用 yarn 的 dockerized pyspark 集群。为了提高数据处理管道的效率,我想增加分配给 pyspark 执行程序和驱动程序的内存量。

这是通过将以下两个键、值对添加到发送给 Livy 的 REST post 请求来完成的: "driverMemory": "20g" "executorMemory": "56g"

这样做会导致以下错误,这是我在 Livy 的日志中发现的:java.lang.IllegalArgumentException: Required executor memory (57344), overhead (5734 MB), and PySpark memory (0 MB) is above the max threshold (8192 MB) of this cluster! Please check the values of 'yarn.scheduler.maximum-allocation-mb' and/or 'yarn.nodemanager.resource.memory-mb'.

当然,我已经适当地编辑了 yarn-site.xml 并通过在文件 and it looks like this 中包含以下行将上述两个值设置为 64 GB,但它似乎没有有所作为。

如果 executorMemory +10% 开销超过 8192 MB,不同的 driverMemory 和 executorMemory 值会出现类似问题。

如何解决此问题并分配更多执行程序内存?

确保您的 yarn.site 在启动服务时在您的主容器和工作容器上看起来完全一样。

您似乎只能在母版上编辑它,这可能是造成这种混乱的一个原因。作为一般经验法则,所有配置文件(以及许多其他内容)在集群中的所有机器上必须看起来完全相同。