你好,游客 登录 注册 搜索
背景:
阅读新闻

Hive优化之自动合并输出的小文件

[日期:2015-06-04] 来源:Linux社区  作者:houzhizhen [字体:大 中 小]

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

<property>
  <name>hive.merge.smallfiles.avgsize</name>
  <value>536870912</value>
  <description>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.</description>
</property>

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

<property>
  <name>hive.merge.mapfiles</name>
  <value>true</value>
  <description>Merge small files at the end of a map-only job</description>
</property>

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

<property>
  <name>hive.merge.mapredfiles</name>
  <value>true</value>
  <description>Merge small files at the end of a map-reduce job</description>
</property>

Hive编程指南 PDF 中文高清版  http://www.linuxidc.com/Linux/2015-01/111837.htm

基于Hadoop集群的Hive安装 http://www.linuxidc.com/Linux/2013-07/87952.htm

Hive内表和外表的区别 http://www.linuxidc.com/Linux/2013-07/87313.htm

Hadoop + Hive + Map +reduce 集群安装部署 http://www.linuxidc.com/Linux/2013-07/86959.htm

Hive本地独立模式安装 http://www.linuxidc.com/Linux/2013-06/86104.htm

Hive学习之WordCount单词统计 http://www.linuxidc.com/Linux/2013-04/82874.htm

Hive运行架构及配置部署 http://www.linuxidc.com/Linux/2014-08/105508.htm

Hive 的详细介绍:请点这里
Hive 的下载地址:请点这里

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-06/118391.htm 

linux
相关资讯       Hive优化  Hive合并小文件 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款