简体   繁体   English

删除内部Hive表不会删除基础Azure Blob存储的内容

[英]Dropping internal Hive table is not deleting the contents of the underlying Azure Blob Storage

I wish to delete the contents of an Azure Blob container by creating an internal Hive table over the contents of the container and the dropping the table as shown below. 我希望通过在容器的内容上创建一个内部Hive表并删除该表来删除Azure Blob容器的内容,如下所示。 The container contains a bunch of text files. 该容器包含一堆文本文件。 However, dropping the Hive table doesn't appear to delete the contents of the container. 但是,删除Hive表似乎不会删除容器的内容。

Am I correct in assuming that dropping an internal table will not remove the contents of the container because HDInsight uses Azure Blob Storage as its storage and not HDFS? 我是否假设删除内部表不会删除容器的内容是正确的,因为HDInsight使用Azure Blob存储作为其存储而不是HDFS? Any insight would be greatly appreciated. 任何见识将不胜感激。 Thanks. 谢谢。

Cheers Ryan 干杯瑞安

--Create internal table
CREATE TABLE temp_logs(
student_id INT,
subject_id INT,
marks INT,
insert_date STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' 
LOCATION 'wasb://logs@myaccount.blob.core.windows.net/';

--Drop internal table and its underlying files in Azure Blob
DROP TABLE temp_logs;

Drop internal hive table will remove the data. 删除内部配置单元表将删除数据。 It is the same behavior as other hadoop systems. 它与其他hadoop系统的行为相同。

When you drop the table, the container will remain. 当您放下表格时,该容器将保留。 Even after you delete the cluster, the container will stay. 即使删除群集后,容器也将保留。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM