删除数据后删除蜂巢外部表,没办法吗? [英] drop hive external table after delete data,No way?

查看:112
本文介绍了删除数据后删除蜂巢外部表,没办法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个配置单元外部表. 首先我使用hdfs dfs -rm -r /.../tableName删除hdfs文件,然后放下表格,很遗憾,我无法放下表格!

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!

然后将文件从废纸rash"移动到表目录中,又恢复了文件,但我也无法删除表!

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 ?

推荐答案

您可以直接从配置单元外壳中删除hdfs文件,如果它可以安全地删除数据的话.

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;

然后您可以使用DROP TABLE命令完全擦除它.

Then you can wipe it completely using DROP TABLE command.

这篇关于删除数据后删除蜂巢外部表,没办法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆