I am trying to use
alter table drop if exists partition
statement to delete data in Hive table.
What would happen if .Trash folder is full? Will the alter table statement just fail silently? What's the workaround?
I am trying to use
alter table drop if exists partition
statement to delete data in Hive table.
What would happen if .Trash folder is full? Will the alter table statement just fail silently? What's the workaround?
If the hive table is external
then the drop partition will only remove the reference in the metastore, leaving the filesystem data intact.
If it's a managed
table, then both will be removed. When purge
keyword is added it will skip the .trash
folder
ALTER TABLE table_identifier DROP [ IF EXISTS ] partition_spec [PURGE]
Now if .trash
folder gets full your cluster will be in unhealthy state. Not sure if the deletion process will fail thought.