apache-spark - 什么是spark.driver.maxResultSize?

标签 apache-spark configuration driver communication distributed-computing

ref说:

Limit of total size of serialized results of all partitions for each Spark action (e.g. collect). Should be at least 1M, or 0 for unlimited. Jobs will be aborted if the total size is above this limit. Having a high limit may cause out-of-memory errors in driver (depends on spark.driver.memory and memory overhead of objects in JVM). Setting a proper limit can protect the driver from out-of-memory errors.



此属性的作用是什么?我的意思是,起初(因为我不为因内存不足错误而失败的工作而奋斗),我认为我应该增加这一点。

再次考虑,该属性似乎定义了 worker 可以发送给驱动程序的结果的最大大小,因此将其保留为默认值(1G)将是保护驱动程序的最佳方法。

但是在这种情况下会发生,工作人员将不得不发送更多消息,那么开销仅仅是工作会变慢吗?

如果我理解正确,假设某个工作人员想要向驱动程序发送4G数据,那么拥有spark.driver.maxResultSize=1G,将导致该工作人员发送4条消息(而不是1条不受限spark.driver.maxResultSize)。如果是这样,那么增加该属性以保护我的驱动程序免遭Yarn的暗杀应该是错误的。

但是,上面的问题仍然存在。.我的意思是,如果将其设置为1M(最小),那将是最具保护性的方法吗?

最佳答案

assuming that a worker wants to send 4G of data to the driver, then having spark.driver.maxResultSize=1G, will cause the worker to send 4 messages (instead of 1 with unlimited spark.driver.maxResultSize).



否。如果数据的估计大小大于maxResultSize,则给定的作业将被中止。这里的目标是保护您的应用程序免受驱动程序损失,仅此而已。

if I set it to 1M (the minimum), will it be the most protective approach?



从某种意义上说是的,但显然在实践中没有用。好的值(value)应该允许应用程序正常进行,但要保护应用程序免受意外情况的影响。

关于apache-spark - 什么是spark.driver.maxResultSize?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39087859/

相关文章:

java - Spring Boot 应用程序的 Spark 上下文问题

java - Spark、Java 中的 DataFrame 转换

vue.js - 在 vue 项目中设置全局 sass 变量

c++ - Raspberry PI 3 - 内核驱动程序 - 无法使用 ioremap() 访问 GPIO

c# - 具有 API 的虚拟网络适配器驱动程序最好使用 c# api

apache-spark - 如何在2个Spark上下文之间共享Spark RDD?

java - 如何使用 jar 中的主类进行 spark-submit?

java - Mongodb java驱动程序错误

java - Hadoop:如何防止失败的任务导致整个作业失败?

configuration - 如何更改 Oracle SQL Developer 中的语言(更改为英语)?