我正在學習 Spark SQL,當我使用 spark-sql 來取消快取以前快取的表時,但在提交 uncache 命令后,我仍然可以查詢快取表。為什么會這樣?
Spark 版本 3.2.0(為 Apache Hadoop 2.7 預構建)
Hadoop 版本 2.7.7
Hive 元存盤 2.3.9
Linux資訊
Static hostname: master
Icon name: computer-vm
Chassis: vm
Machine ID: 15c**********************10b2e19
Boot ID: 48b**********************efc169b
Virtualization: vmware
作業系統:Ubuntu 18.04.6 LTS 內核:Linux 4.15.0-163-generic 架構:x86-64
spark-sql (default)> CACHE TABLE testCache SELECT * FROM students WHERE AGE = 13;
Error in query: Temporary view 'testCache' already exists
spark-sql (default)> UNCACHE TABLE testCache;
Response code
Time taken: 0.092 seconds
spark-sql (default)> SELECT * FROM testCache;
NAME rollno AGE
Kent 8 21
Marry 1 10
Eddie Davis 5 13
Amy Smith 3 13
Barron 3 12
Fleur Laurent 4 9
Ivy 3 8
Time taken: 0.492 seconds, Fetched 7 row(s)
uj5u.com熱心網友回復:
UNCACHE TABLE從給定表或視圖的記憶體和/或磁盤快取中洗掉條目和相關資料,而不是洗掉表。所以你仍然可以查詢它。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/383918.html
