简体   繁体   中英

drop hive external table after delete data,No way?

I have a hive external table. first I delete the hdfs file use hdfs dfs -rm -r /.../tableName ,then I drop the table,Unfortunately,I can't drop the table!

Then I move the file from Trash to table Catalog,aka restore the file,but I also could not drop the table!

now,I can not create a new table ,nor drop the table,what can I do to drop the table ?

You can directly delete hdfs file from the hive shell may be it works for safely remove the data.

hive> dfs -rmr /user/hive/warehouse/database_name.db/table_name;

OR

hive> dfs -rm -r /user/hive/warehouse/database_name.db/table_name;

Then you can wipe it completely using DROP TABLE command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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