emmm,你看下这个能不能帮到你 https://jxeditor.github.io/2020/06/10/Hive%E5%8E%8B%E7%BC%A9%E6%95%88%E6%9E%9C%E4%B8%8D%E6%98%8E%E6%98%BE%E8%B8%A9%E5%9D%91%E8%AE%B0%E5%BD%95/
------------------------------------------------------------------ 发件人:RS <[email protected]> 发送时间:2022年2月22日(星期二) 09:36 收件人:user-zh <[email protected]> 主 题:hive 进行 overwrite 合并数据后文件变大? Hi, flink写hive任务,checkpoint周期配置的比较短,生成了很多小文件,一天一个目录, 然后我调用flink sql合并之前的数据,跑完之后,发现存储变大了,请教下这个是什么原因导致的? 合并之前是很多小part文件,overwrite之后文件减少了,但是存储变大了,从274MB变大成2.9GB了? hive表table1的分区字段是`date` insert overwrite aw_topic_compact select * from `table1` where `date`='2022-02-21'; 合并前: 514.0 M 1.5 G /user/hive/warehouse/ods.db/table1/date=2022-02-20 274.0 M 822.1 M /user/hive/warehouse/ods.db/table1/date=2022-02-21 48.1 M 144.2 M /user/hive/warehouse/ods.db/table1/date=2022-02-22 合并后: 514.0 M 1.5 G /user/hive/warehouse/ods.db/table1/date=2022-02-20 2.9 G 8.7 G /user/hive/warehouse/ods.db/table1/date=2022-02-21 47.6 M 142.9 M /user/hive/warehouse/ods.db/table1/date=2022-02-22
