How-to: resolve spark streaming "Not enough space to cache input-0-* in memory! "

本文介绍了如何解决Spark Streaming在处理数据时遇到的'Not enough space to cache input-0-* in memory!'错误。通过增加`spark.storage.memoryFraction`的值到0.9以及将`spark.driver.memory`从1g提升到2g,成功解决了此内存不足的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Error:
15/09/22 21:52:51 WARN storage.MemoryStore: Failed to reserve initial memory threshold of 1024.0 KB for computing block input-0-1442929965600 in memory.
15/09/22 21:52:51 WARN storage.MemoryStore: Not enough space to cache input-0-1442929965600 in memory! (computed 504.0 B so far)
15/09/22 21:52:51 INFO storage.MemoryStore: Memory use = 4.6 MB (blocks) + 529.8 MB (scratch space shared across 1 thread(s)) = 534.4 MB. Storage limit = 534.5 MB.

Root case && resolve:
This is cased by storage MemoryStore is not enough. Two ways to resolve:
  1. Increase spark.storage.memoryFraction, default is 0.6. Could increase to 0.9.
  2. Increase spark.driver.memory, my original is 1g, I increase to 2g. Issue resolved.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值