如何取消缓存RDD? [英] How to uncache RDD?
本文介绍了如何取消缓存RDD?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用缓存()
缓存在内存中的数据,但我意识到,看不缓存数据的表现,我需要取消缓存它从内存中清除数据:
I used cache()
to cache the data in memory but I realized to see the performance without cached data I need to uncache it to remove data from memory:
rdd.cache();
//doing some computation
...
rdd.uncache()
但我得到的错误说:
but I got the error said:
值取消缓存是不是org.apache.spark.rdd.RDD的成员[(智力,数组[浮动])]
value uncache is not a member of org.apache.spark.rdd.RDD[(Int, Array[Float])]
我不知道该怎么办了取消缓存呢!
I don't know how to do the uncache then!
推荐答案
尝试使用 unpersist()
(source )。
这篇关于如何取消缓存RDD?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文