Changing Hive Dynamic Partition Limits

Symptoms:

Hive enforces limits on the number of dynamic partitions that it creates.  The default is 100 dynamic partitions per node, with a total (default) limit of 1000 dynamic partitions across all nodes. However, this can be tuned.  If your job tries to create too many dynamic partitions, you may see a stack trace similar to the following:

Diagnostic Messages for this Task:
Error: java.lang.RuntimeException: org.apache.hadoop.hive.ql.
metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to: 100
at org.apache.hadoop.hive.ql.exec.mr.ExecReducer.reduce(ExecReducer.java:283)
at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:444)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:392)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:167)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1556)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to: 100
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.getDynOutPaths(FileSinkOperator.java:747)
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.startGroup(FileSinkOperator.java:829)
at org.apache.hadoop.hive.ql.exec.Operator.defaultStartGroup(Operator.java:498)
at org.apache.hadoop.hive.ql.exec.Operator.startGroup(Operator.java:521)
at org.apache.hadoop.hive.ql.exec.mr.ExecReducer.reduce(ExecReducer.java:232)
... 7 more
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce Jobs Launched:

Cause:

Your Hive job tried to create too many dynamic partitions on a node, exceeding the current limits. The number of dynamic partitions is controlled by the settings forhive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode.  The default is 100 dynamic partitions on a single node, with a limit of 1000 overall.

Solution:

Set the values for hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode to higher values.  For example:

SET hive.exec.dynamic.partition=true;
SET hive.exec.max.dynamic.partitions=2048;
SET hive.exec.max.dynamic.partitions.pernode=256;

hive 动态分区(Dynamic Partition)异常处理的更多相关文章

  1. hive中简单介绍分区表(partition table)——动态分区(dynamic partition)、静态分区(static partition)

    一.基本概念 hive中分区表分为:范围分区.列表分区.hash分区.混合分区等. 分区列:分区列不是表中的一个实际的字段,而是一个或者多个伪列.翻译一下是:“在表的数据文件中实际上并不保存分区列的信 ...

  2. hive 动态分区实现 (hive-1.1.0)

    笔者使用的hive版本是hive-1.1.0 hive-1.1.0动态分区的默认实现是只有map没有reduce,通过执行计划就可以看出来.(执行计划如下) insert overwrite tabl ...

  3. Hive动态分区和分桶(八)

    Hive动态分区和分桶 1.Hive动态分区 1.hive的动态分区介绍 ​ hive的静态分区需要用户在插入数据的时候必须手动指定hive的分区字段值,但是这样的话会导致用户的操作复杂度提高,而且在 ...

  4. 什么是hive的静态分区和动态分区,它们又有什么区别呢?hive动态分区详解

    面试官问我,什么是hive的静态分区和动态分区,这题我会呀. 简述 分区是hive存放数据的一种方式,将列值作为目录来存放数据,就是一个分区,可以有多列. 这样查询时使用分区列进行过滤,只需根据列值直 ...

  5. Hive动态分区

    1.开启支持动态分区 set hive.exec.dynamic.partition=true; --默认为false set hive.exec.dynamic.partition.mode=nos ...

  6. hive动态分区和混合分区

    各位看官,今天我们来讨论下再Hive中的动态分区和混合分区方面的一些知识点以及相关的一些问题. 前面我们已经讲过管理表和外部表的一般分区的一些知识点,对于需要对表创建很多的分区,那么用户就需要些很多的 ...

  7. hive 动态分区与混合分区

    hive的分区概念,相信大家都非常了解了.通过将数据放在hdfs不同的文件目录下,查表时,只扫描对应分区下的数据,避免了全表扫描. 提升了查询效率. 关于hive分区,我们还会用到多级分区.动态分区. ...

  8. hive 动态分区插入

    首先需要进行以下设置: set hive.exec.dynamic.partition=true; set hive.exec.dynamic.partition.mode=nonstrict; se ...

  9. Hive动态分区 参数配置及语法

    Hive本身是不支持动态分区的.. 但动态分区是真的方便啊..不然手动维护要累死..按日期甚至小时来分区时动辄就好几千上万的分区..手动到哪一年去..? 想要用动态分区要先做一些设置来修改默认的配置. ...

随机推荐

  1. Linux中的目录功能(Red Hat 7)

    目录的基本功能: /bin:存放普通用户使用的命令 /sbin:存放管理员可以执行的命令 /home:存放普通的家目录 如张三家目录为/home/zhangsan /root:管理员的家目录 /etc ...

  2. loj136 (最小瓶颈路,多次询问)

    题目描述 给定一个包含 n nn 个节点和 m mm 条边的图,每条边有一个权值.你的任务是回答 k kk 个询问,每个询问包含两个正整数 s ss 和 t tt 表示起点和终点,要求寻找从 s ss ...

  3. 【转】Linux系统安装Redis详细过程

    本文来源 https://blog.csdn.net/qq_20989105/article/details/76390367 ,转载前请先联系原作者并声明出处. 一.安装gcc 1.Redis在li ...

  4. 2019js面试题前端必问点小视频

    其实市面上的面试题有很多,但是大部分都是总结的blog居多,有时候说明一个事物也许口述几分钟就可以搞定,但是看帖子可能要分析半天 所以我就出一部分前端js必考的小视频,不管我们什么时候面试基本都绕不过 ...

  5. 初步学习pg_control文件之五

    接前文 初步学习pg_control文件之四,继续看何时出现  DB_IN_CRASH_RECOVERY: 看下面代码就比较清楚了:如果对 InArchiveRecovery 判断值为假,而且 读取出 ...

  6. 2648: SJY摆棋子

    2648: SJY摆棋子 https://www.lydsy.com/JudgeOnline/problem.php?id=2648 分析: k-d tree 模板题. 代码: #include< ...

  7. P1189 SEARCH(逃跑的拉尔夫)

    P1189 SEARCH 题目描述 年轻的拉尔夫开玩笑地从一个小镇上偷走了一辆车,但他没想到的是那辆车属于警察局,并且车上装有用于发射车子移动路线的装置. 那个装置太旧了,以至于只能发射关于那辆车的移 ...

  8. Delphi实例之橡皮筋画图的实现

    Delphi实例之橡皮筋画图的实现 在<Delphi7基础教程>这本书的练习中提到过一个橡皮筋画图的例子,书上的源码是错误的!不知道是打印的错误还是本身源码就有问题,我将它改了过来. 在F ...

  9. 今天买了个pro,开始ios开发

    今天买了个mac pro 开始ios开发啦,爽!

  10. 步骤2:JMeter 分布式测试(性能测试大并发、远程启动解决方案)

    转载(记录) http://www.cnblogs.com/fengpingfan/p/5583954.html http://www.cnblogs.com/puresoul/p/4844539.h ...