博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hive 动态分区(Dynamic Partition)异常处理
阅读量:6963 次
发布时间:2019-06-27

本文共 2821 字,大约阅读时间需要 9 分钟。

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;

转载于:https://www.cnblogs.com/dailidong/p/7571173.html

你可能感兴趣的文章
http和ftp下载的区别
查看>>
通过ngx-lua来统计Nginx上的虚拟主机性能数据
查看>>
POJ 2031 prim
查看>>
解决eclipse project前出现红色感叹号 但没有提示错误出在什么地方build path jar包也没报错...
查看>>
Linux crontab 命令格式与具体样例
查看>>
mysql中不同事务隔离级别下数据的显示效果--转载
查看>>
安卓应用如何赚钱
查看>>
堆和栈的区别(转过无数次的文章)
查看>>
作为一枚第二天上班的小小.net程序员(技术宅的那种)很迷茫哦,第一个随笔
查看>>
Android Studio 添加Assets目录
查看>>
前端的各种各样的面试题大全
查看>>
构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(39)-在线人数统计探讨
查看>>
Linux下批量替换文件内容方法
查看>>
C#程序实现动态调用DLL的研究(转)
查看>>
mongoDB 3.0 安全权限访问控制 -摘自网络
查看>>
VBOX Ubuntu设置与Windows的共享文件夹
查看>>
android 获取activity当前view
查看>>
Linux内存管理-高端内存(一)
查看>>
Python 包管理工具解惑
查看>>
Java正則表達式入门
查看>>