UNCACHE表是Spark SQL中的惰性操作吗? [英] Is UNCACHE table a lazy operation in Spark SQL?

查看:264
本文介绍了UNCACHE表是Spark SQL中的惰性操作吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apache Spark SQL操作 CACHE表有一个选项,可以使其懒惰运行. 但是UNCACHE表又如何呢? 文档没有说不管是否懒惰都可以.是将表从高速缓存中立即删除还是将其推迟到下一次垃圾回收?如果它是惰性的,是否有办法找出我的表是否仍被缓存?

The Apache Spark SQL operation CACHE table has an option so that it runs lazy. But what about UNCACHE table ? The documentation doesn't say anything if it is lazy or not. Will the table be dropped immediately from cache or will it be deferred until the next run of the garbage collection? If it is lazy, is there a way to find out, if my table is still cached or not?

推荐答案

默认的UNCACHE操作是非阻塞的.如果使用DSL,则可以在数据帧/数据集上调用df.unpersist(true)以阻止操作.

The default UNCACHE operation is non-blocking. If you use the DSL, you can call df.unpersist(true) on a dataframe/dataset to make the operation blocking.

这篇关于UNCACHE表是Spark SQL中的惰性操作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆