我们采用亚马逊emr构建的集群,用hive查询的时候报错,FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask,查看了下面的参数,挺有帮助的 我是设置了这个参数set hive.tez.auto.reducer.parallelism=true;
Tez内存优化
1、AM、Container大小设置
tez.am.resource.memory.mb
参数说明:Set tez.am.resource.memory.mb tobe the same as yarn.scheduler.minimum-allocation-mb the YARNminimum container size.
hive.tez.container.size
参数说明:Set hive.tez.container.size to be the same as or a small multiple(1 or 2 times that) of YARN container size yarn.scheduler.minimum-allocation-mb but NEVER more than yarn.scheduler.maximum-allocation-mb.
2、AM、Container JVM参数设置
tez.am.launch.cmd-opts
默认值:80%*t

本文详细介绍了在Hive使用Tez引擎时的优化策略,包括AM和Container的内存设置、MapReduce优化、MapJoin参数调整以及Container重用设置。通过调整tez.am.resource.memory.mb、hive.tez.container.size等关键参数,可以有效提升Hive查询性能。
最低0.47元/天 解锁文章
640

被折叠的 条评论
为什么被折叠?



