hive参数配置详情可查官方文档:Hive Configuration+Properties

本文针对 reducer 调优,主要涉及一下三个参数:

hive.exec.reducers.bytes.per.reducer

Default Value: 1,000,000,000 prior to Hive 0.14.0; 256 MB (256,000,000) in Hive 0.14.0 and later Added In: Hive 0.2.0; default changed in 0.14.0 with HIVE-7158 (and HIVE-7917) Size per reducer. The default in Hive 0.14.0 and earlier is 1 GB, that is, if the input size is 10 GB then 10 reducers will be used. In Hive 0.14.0 and later the default is 256 MB, that is, if the input size is 1 GB then 4 reducers will be used.

说明:每个reducer能够处理的文件大小。这个参数控制一个job会有多少个reducer来处理,依据的是输入文件的总大小。官方默认值:1G

查看配置的默认值:

hive> set hive.exec.reducers.bytes.per.reducer;
hive.exec.reducers.bytes.per.reducer=1024000000

临时调参:

hive> set hive.exec.reducers.bytes.per.reducer=15364000000;
hive>  set hive.exec.reducers.bytes.per.reducer;
hive.exec.reducers.bytes.per.reducer=15364000000

mapred.reduce.tasks

  • Default Value: -1
  • Added In: Hive 0.1.0 The default number of reduce tasks per job. Typically set to a prime close to the number of available hosts. Ignored when mapred.job.tracker is “local”. Hadoop set this to 1 by default, whereas Hive uses -1 as its default value. By setting this property to -1, Hive will automatically figure out what should be the number of reducers.

含义:设置每个job的reduce数。官方默认值为:-1

查看配置的默认值:

hive> set mapred.reduce.tasks;
mapred.reduce.tasks=-1

临时调参:

hive> set mapred.reduce.tasks=100;
hive> set mapred.reduce.tasks;
mapred.reduce.tasks=100

hive.exec.reducers.max

  • Default Value: 999 prior to Hive 0.14.0; 1009 in Hive 0.14.0 and later
  • Added In: Hive 0.2.0; default changed in 0.14.0 with HIVE-7158 (and HIVE-7917) Maximum number of reducers that will be used. If the one specified in the configuration property mapred.reduce.tasks is negative, Hive will use this as the maximum number of reducers when automatically determining the number of reducers.

含义:设置最大的reduce数。如果mapreduce计算的reduce数超过设定值的值,则取设置的值。

查看配置的默认值:

hive> set hive.exec.reducers.max;
hive.exec.reducers.max=1099

临时调参:

hive> set hive.exec.reducers.max=999;
hive> set hive.exec.reducers.max;
hive.exec.reducers.max=999

以上所有set的值,都只是临时调整,不会改变配置文件中的配置。当你重新打开hive会话,查看相应的配置就一目了然了。

hive mapreduce reducer 调优相关推荐

  1. hive的一些调优参数

    hive的一些调优参数 set hive.exec.dynamic.partition.mode=nonstrict; 使用动态分区 set hive.exec.max.dynamic.partiti ...

  2. ambari_HDP之mapreduce参数调优

    一.基础环境 基础环境: centos6.8 ambari版本: 2.2.1 HDP版本: 2.3.2.0 HDP的默认配置文件:(本文以ambari-2.2.1为例): 配置文件目录:/usr/hd ...

  3. Hive ETL 任务调优(参数篇)

    Hive 调优-参数篇 图片来源网络,点赞 工作中常用的 hive 参数调优,整理如下. 原则: 最少数据 最少字段 最少Job数 最少读取次数 避免数据倾斜 整体最优而不是局部最优 JVM 内存 文 ...

  4. 【Hive】性能调优 - EXPLAIN

    Hive版本: hive-1.1.0-cdh5.14.2 用户提交HiveQL查询后,Hive会把查询语句转换为MapReduce作业.Hive会自动完成整个执行过程,一般情况下,我们并不用知道内部是 ...

  5. Dr Elephant(HIVE JOB监控调优)安装使用

    一.简单介绍 Dr.elephant是一款对Hadoop和Spark任务进行性能监控和调优的工具 官方介绍 github地址 安装文档(Must-Read) 二.安装中注意的问题 1.编译失败,测试用 ...

  6. Hive参数性能调优

    之前遇到的问题是,整个集群的资源非常多,但是执行hive sql就是很慢,然后到yarn资源管理页面一看,发现整个任务只启动了一个container执行,集群资源完全没有利用起来.于是通过调整了以下相 ...

  7. 【Hive】性能调优 - map-side JOIN

    Hive版本: hive-1.1.0-cdh5.14.2 概述 如果表关联时,有一张表很小,那么可以在大表通过mapper时将小表完全加载到内存中,Hive可以在map端完成关联过程,这就是所谓的ma ...

  8. 大数据开发笔记(四):Hive数仓调优

      ✨大数据开发笔记推荐: 大数据开发面试知识点总结_GoAI的博客-CSDN博客_大数据开发面试​本文详细介绍大数据hadoop生态圈各部分知识,包括不限于hdfs.yarn.mapreduce.h ...

  9. 记录一次hive的JVM调优

    关于Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. GC overhead l ...

  10. Hive SQL调优

    1.背景 目前数据存在的问题 1.用户使用场景集中在上班高峰时间 2.SQL质量需要调整/调优 2.目标 总结通用的SQL优化方式进行推广 3.优化方式 目前hive版本2.3.5,执行引擎是Tez ...

最新文章

  1. JS中的7种设计模式
  2. 解决Mask RCNN训练时GPU内存溢出问题
  3. redis数据持久化的两种方式
  4. 这是一个有趣的问题,Java 8 Lambda 表达式被编译成了什么?
  5. typescript利用接口类型声明变量_TypeScript入门指南(基础篇)
  6. 生成树协议实验报告_多生成树协议MSTP
  7. (转)C 语言高效编程的几招
  8. Center OS 7 /etc/rc.d/init.d/network, status=6
  9. 关于博客的排版和字体
  10. sql join on和不用join区别_图解 SQL 各种 JOIN,太有用了!
  11. 能ping通,TCP就一定能连通吗?
  12. 常用的台湾繁体字字体(轉)
  13. Solaris11操作命令汇总
  14. 如何用VBA寻找指定区域中的第一个非空单元格
  15. dk 图解计算机科学pdf,DK英语:7套DK经典图解词典,再也不用死记硬背了!
  16. ASP.NET制作调查问卷
  17. CSP - 201403-1 - 相反数 (C++)
  18. 平均查找长度 (ASL)
  19. python求组合数c(m、n)编程题_c语言编程问题,计算出从n 个不同元素中取出m 个元素(m≤n)的组合数。编写程序...
  20. 收藏 40 2 CPD (广告合作方式)

热门文章

  1. Wireshark的下载安装及简单使用教程
  2. Windows Server2012搭建Git服务器
  3. 经典网页设计:30个独具匠心的单页网站设计案例
  4. 经验:中小微企业网站上云怎样选择适合自己的云虚拟主机?
  5. Canvas绘制飞机飞行
  6. JS编程建议——16:防止switch贯穿
  7. Java将英文句子分解为单词
  8. u3d联机斗地主(1):出牌规则
  9. [PAT] PAT注意点
  10. 微信开发笔记:生成带参数的公众号二维码