赞
踩
进入运行中,或者运行完作业对应的 “Tracking URL”。以下示例是已经运行完的 job。
进入 tez-ui 之后,点击 Configurations
输入要查询的配置项,点击"Regex Search"。如果查询的值和默认值不一样,说明管理员修改了 tez-site.xml。
查看 tez-site.xml 可以看设置的配置项。查看 tez-default-template.xml 可以看到所有的配置项及默认值。
<property>
<name>tez.am.resource.cpu.vcores</name>
<defaultValue>1</defaultValue>
<description>Int value. The number of virtual cores to be used by the app master</description>
<type>integer</type>
</property>
<property>
<name>tez.am.resource.memory.mb</name>
<defaultValue>1024</defaultValue>
<description>Int value. The amount of memory in MB to be used by the AppMaster</description>
<type>integer</type>
</property>
<property>
<name>hive.tez.container.size</name>
<value>-1</value>
<description>By default Tez will spawn containers of the size of a mapper. This can be used to overwrite.</description>
</property>
<property>
<name>hive.tez.cpu.vcores</name>
<value>-1</value>
<description>
By default Tez will ask for however many cpus map-reduce is configured to use per container.
This can be used to overwrite.
</description>
</property>
默认按以上配置,如果值小于0。则按以下配置
mapreduce.map.memory.mb 默认: 1024
mapreduce.map.cpu.vcores 默认: 1
千万不要在 hive.tez.java.opts
配置项中添加 -Xmx
参数,因为 tez 引擎会根据容器的大小动态配置。默认是容器内存的 0.8 分配给 java 堆内存,由以下参数设置。
<property> <name>tez.container.max.java.heap.fraction</name> <defaultValue>0.8</defaultValue> <description>Double value. Tez automatically determines the Xmx for the JVMs used to run Tez tasks and app masters. This feature is enabled if the user has not specified Xmx or Xms values in the launch command opts. Doing automatic Xmx calculation is preferred because Tez can determine the best value based on actual allocation of memory to tasks the cluster. The value if used as a fraction that is applied to the memory allocated Factor to size Xmx based on container memory size. Value should be greater than 0 and less than 1. Set this value to -1 to allow Tez to use different default max heap fraction for different container memory size. Current policy is to use 0.7 for container smaller than 4GB and use 0.8 for larger container.</description> <type>float</type> </property>
由于 tez 引擎在连接 driver 的时候,就启动 AppMaster 和一定数量的 container(默认为0),所以动态设置不生效。
beeline 设置 am 的内存的方法如下,其他参数类似。
beeline --hiveconf tez.am.resource.memory.mb=5120
设置容器的内
beeline --hiveconf hive.tez.container.size=4096
hive 命令行设置 am 的内存的方法如下,其他参数类似。
hive --hiveconf tez.am.resource.memory.mb=1024
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。