You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by Shuai Xia <jk...@dingtalk.com.INVALID> on 2022/02/24 03:17:11 UTC

回复:hive 进行 overwrite 合并数据后文件变大?

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 <ti...@163.com>
发送时间:2022年2月22日(星期二) 09:36
收件人:user-zh <us...@flink.apache.org>
主 题: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