Is UNCACHE table a lazy operation in Spark SQL?

孤者浪人 提交于 2020-01-22 02:21:29

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/47226494/is-uncache-table-a-lazy-operation-in-spark-sql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!