问题
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