- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Drop database doesn't remove HDFS directory.
- Labels:
-
Cloudera Manager
Created ‎10-26-2018 07:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I run the drop database command within impala it doesn't remove the corresponding HDFS files.
drop database if exists databasename cascade;
I want to drop a database and remove the corresponding hdfs files.
Per the documentaion -
DROP DATABASE Statement
Removes a database from the system.
The physical operations involve removing the metadata for the database from the metastore, and deleting the corresponding *.db directory from HDFS.
The cascade parameter drops the tables within the database first.
I'm running CDH 513.3 and CM 514.3.
Created ‎10-26-2018 11:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had the similar issue long back and below was my findings
Please check the owner of HDFS folder/files for the corresponding db that you are trying to delete. if you are the owner and trying to delete the table/db from hive/impala, it will delete both metadata and hdfs file/folder. Whereas you are not the owner of hdfs folder/file but got an access in hive/impala to manage data and trying to delete it, it will just delete the metadata but not the underlined folder/files from hdfs
pls try this with a sample db/table for more understanding
