Hive |
您所在的位置:网站首页 › 删除hdfs文件的命令 › Hive |
场景: 今天在删除一个表分区数据的时候,直接删除的HDFS对应目录下的文件 ds=20230614 image.png就是hdfs的数据删除了,使用show partitions tablename 发现该分区还存在,hive的metastore却没有更新, 查阅资料发现hive的msck命令只能修复新增的分区 msck repair table tablename; 可以使用以下命令解决 alter table tableneme drop partition(ds='20230614') 对应有条件清理对应分区的,可以使用规则判断,或者正则 alter table tableneme partition(ds |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |