1.常遇到的问题

  • 1.1 hive语句写入报错
insert overwrite table dwd_user 
select xh,name from ods_user
  • 1.2 hive查询语句涉及到需要mapreduce处理的也报错

2.关联关系

hive on tez的调优《数据仓库》_hive

3.调优实践

假如我们使用的节点资源如上图所示,根据hive解析sql提交给tez,tez任务提交给yarn,所以内存大小配置一定不要超出容器的大小:

3.1 配置yarn

yarn.nodemanager.resource.memory-mb   =300G

yarn.scheduler.minimum-allocation-mb =4G

yarn.scheduler.maximum-allocation-mb = 20G

3.2 配置tez

tez.am.resource.memory.mb  =2G
tez.runtime.io.sort.mb =3G

3.3 配置hive

hive.tez.container.size  = 3.2G

参考了国外的文档,国内资料都不靠谱https://community.cloudera.com/t5/Community-Articles/Demystify-Apache-Tez-Memory-Tuning-Step-by-Step/ta-p/245279