Hadoop 分区仍然显示在配置单元中,即使为外部表删除了分区

Hadoop 分区仍然显示在配置单元中,即使为外部表删除了分区,hadoop,hive,hiveql,impala,Hadoop,Hive,Hiveql,Impala,我在蜂巢中有一个按年、月、日划分的外部表。所以我删除了一个分区,但我仍然在show分区中看到它 >use test_raw_tables; >show partitions test1_raw; [year=2016/month=01/day=01] [year=2017/month=03/day=24] > alter table test1_raw drop partition (year=2016, month=01, day=01); > refresh tes

我在蜂巢中有一个按年、月、日划分的外部表。所以我删除了一个分区,但我仍然在show分区中看到它

>use test_raw_tables;
>show partitions test1_raw;
[year=2016/month=01/day=01]
[year=2017/month=03/day=24]

> alter table test1_raw drop partition (year=2016, month=01, day=01);
> refresh test1_raw;
> show partitions test1_raw;
[year=2016/month=01/day=01]
[year=2017/month=03/day=24]     ---Still see the dropped partition here----

> msck repair table test1_raw;
> show partitions test1_raw;
[year=2016/month=01/day=01]
[year=2017/month=03/day=24]    ---Still see the dropped partition here----
以蜂巢为引擎,从黑斑羚身上跑出来

描述test1\u raw 列名称、数据类型、注释“持有金额”、“整数”、“id”、“整数”、“交易id”、“字符串”、“收件人id”、“字符串”、“年”、“字符串”、“月”、“字符串”、“日”、“字符串”、“无”、“无”、“分区信息”、“无”、“无”、“无”列名称、“数据类型”、“注释”、“无”、“无”、“年”、“字符串”、“月”、“字符串”、“日”、“字符串”, 地点'hdfs://localhost/sys/datalake/testing/test1_raw"

这里有什么问题?
删除该分区后,hdfs中的数据将被删除。无法解决此问题。

在表定义列中,年、月和日是字符串格式。 请尝试使用“2016”、“01”和“01”。 我使用下面的代码,它的工作

alter table test1_raw drop partition (year='2016', month='01', day='01');

1请添加表定义2,从何处运行代码?黑斑羚壳?蜂箱直线?@DuduMarkovitz表是一个外部表。从hive shell.refresh运行查询的方式是Impala命令,而不是hive。我需要知道从何处执行什么以及表定义,包括相关的分区定义。另外,请告诉我它们在文件系统中的路径是什么样子的。请将此内容以及相关分区的路径添加到帖子中。如果对您有效,请确保答案正确。我猜这是Hive的一个bug,msck修复不会删除其自身上已删除的分区。表是外部的,这意味着Hive确实没有所有权,但仍然不起作用。但通过ALTERTABLE命令删除分区是可行的。