hive小文件合并机制_hive优化之自动合并输出的小文件

1.先在hive-site.xml中设置小文件的标准.

hive.merge.smallfiles.avgsize

536870912

When the average output file size of a job is less than this number, Hive will start an additional map-reduce job to merge the output files into bigger files. This is only done for map-only jobs if hive.merge.mapfiles is true, and for map-reduce jobs if hive.merge.mapredfiles is true.

2.为只有map的mapreduce的输出并合并小文件.

hive.merge.mapfiles

true

Merge small files at the end of a map-only job

3.为含有reduce的mapreduce的输出并合并小文件.

hive.merge.mapredfiles

true

Merge small files at the end of a map-reduce job

更多相关教程请访问 MySQL视频教程

本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉

本文系统来源:php中文网

TAG标签:hive优化

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值