【发布时间】:2016-10-27 07:19:05
【问题描述】:
我在 hdfs 上有文件夹/user/test/year=2016/month=04/dt=25/000000_0
需要将上述分区路径添加到test表中。
命令:
ALTER TABLE test ADD IF NOT EXISTS PARTITION (year=2016,month=04,dt=25)
但是这个添加分区命令忽略了月份分区中的前导零,并在 2016 内创建了一个额外的文件夹作为月份 = 4。
/user/test/year=2016/month=04/
/user/test/year=2016/month=4/
并且表将指向/user/test/year=2016/month=4/这个不包含任何数据的路径。
我检查了日志,上面写着
WARN org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer - Partition Spec month=04 has been changed to month=4
如果有人遇到这种问题以及如何避免这种情况,请告诉我?
Hive 版本是:1.2.1000
【问题讨论】:
标签: hadoop hive hadoop-yarn hive-partitions hiveddl