如何在HDFS中手动删除分区数据时更新Hive中的分区元数据 [英] How to update partition metadata in Hive , when partition data is manualy deleted from HDFS

查看:1815
本文介绍了如何在HDFS中手动删除分区数据时更新Hive中的分区元数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自动更新Hive分区表的元数据的方法是什么?

What is the way to automatically update the metadata of Hive partitioned tables?

如果新分区数据被添加到HDFS(没有alter table add分区命令执行)。那么我们可以通过执行命令'msck repair'来同步元数据。

If new partition data's were added to HDFS (without alter table add partition command execution) . then we can sync up the metadata by executing the command 'msck repair'.

如果大量分区数据从HDFS中删除(不执行更改表格放置分区commad执行)。

What to be done if a lot of partitioned data were deleted from HDFS (without the execution of alter table drop partition commad execution).

如何合并Hive元数据?

What is the way to syncup the Hive metatdata?

推荐答案

尝试使用

Try using

MSCK REPAIR TABLE <tablename>;

这篇关于如何在HDFS中手动删除分区数据时更新Hive中的分区元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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