drop hive external table after delete data,No way?

2019-08-20 07:31发布

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 ?

标签: hadoop hive
1条回答
smile是对你的礼貌
2楼-- · 2019-08-20 08:00

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.

查看更多
登录 后发表回答