【问题标题】:Corrupted Hive tables can't be dropped无法删除损坏的 Hive 表
【发布时间】:2015-02-18 22:29:40
【问题描述】:

我在 Hive 中创建的两个表存在问题。我使用

创建了这两个表

创建 TABLE 表 LIKE other_table;

然后尝试使用

将存储格式更改为ORC

ALTER TABLE 表 SET FILEFORMAT ORC;

这显然损坏了表,因为它们现在在访问它们时会抛出 table not found 的错误。但是,它们仍然出现在一个带有显示表的位置;陈述。现在,我不能删除表或创建具有相同名称的新表。这是 Hive CLI 的直接输出:

hive> show tables;
OK
bk_new_profile_events
bk_new_profiles
Time taken: 0.245 seconds, Fetched: 19 row(s)
hive> drop table bk_new_profiles;
FAILED: SemanticException [Error 10001]: Table not found bk_new_profiles
hive> drop table bk_new_profile_events;
FAILED: SemanticException [Error 10001]: Table not found bk_new_profile_events
hive>

【问题讨论】:

    标签: hadoop hive


    【解决方案1】:

    使用 hdfs 命令手动删除表的目录:

    hdfs dfs -rm -r the/path/to/the/table

    (注意 -r)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-04
      • 2016-06-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多