生产中遇到的spark任务问题
spark版本 2.2.0
日志里面的信息:
WARN RowBasedKeyValueBatch: Calling spill() on RowBasedKeyValueBatch. Will not spill but return 0.
What could be the reason for this warning? Is this something I should care about or can I safely ignore it?
回答1
As indicated here this warning means that your RAM is full and that part of the RAM contents are moved to disk.
See also the Spark FAQ
Does my data need to fit in memory to use Spark?
No. Spark's operators spill data to disk if it does not fit in memory, allowing it to run well on any sized data. Likewise, cached datasets that do not fit in memory are either spilled to disk or recomputed on the fly when needed, as determined by the RDD's storage level.
回答2
I guess this message is worse than a simple warning : it is on the edge of being an error.
Have a look at the source code :
/** * Sometimes the TaskMemoryManager may call spill() on its associated MemoryConsumers to make * space for new consumers. For RowBasedKeyValueBatch, we do not actually spill and return 0. * We should not throw OutOfMemory exception here because other associated consumers might spill */ public final long spill(long size, MemoryConsumer trigger) throws IOException { logger.warn("Calling spill() on RowBasedKeyValueBatch. Will not spill but return 0."); return 0; }
here : https://github.com/apache/spark/blob/master/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/RowBasedKeyValueBatch.java
So I would say here you are on an infinite loop of "needing to spill but actually not spilling".
来源:https://stackoverflow.com/questions/46907447/meaning-of-apache-spark-warning-calling-spill-on-rowbasedkeyvaluebatch
引用:https://www.e-learn.cn/topic/3560880
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· 字符编码:从基础到乱码解决
· Open-Sora 2.0 重磅开源!