我知道这类问题已在几篇文章中得到解决,但我找不到答案,提供具体的“如何”或“在哪里”
我正在使用CDH5.2,运行执行shell命令的oozie工作流。每次运行它时,nodemanager都会使用以下错误终止作业:
Container [pid=6757,containerID=container_1424206993158_0001_01_000002] is running beyond physical memory limits. Current usage: 1.0 GB of 1 GB physical memory used; 2.3 GB of 2.1 GB virtual memory used. Killing container
以下是我的配置文件中的相关属性。我已经明显错过了一些东西,所以我正在寻找方向,特别是这个设置必须在哪里。
纱-site.xml中:
<property>
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>2048</value>
</property>
<property>
<name>yarn.scheduler.maximum-allocation-mb</name>
<value>8196</value>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>8196</value>
</property>
mapred-site.xml中:
<property>
<name>mapreduce.map.memory.mb</name>
<value>4096</value>
</property>
<property>
<name>mapreduce.reduce.memory.mb</name>
<value>8196</value>
</property>
<property>
<name>mapreduce.map.java.opts</name>
<value>-Xmx3072m</value>
</property>
<property>
<name>mapreduce.reduce.java.opts</name>
<value>-Xmx6144m</value>
</property>
答案 0 :(得分:1)
在Cloudera Manager 5中,您可以在以下位置修改这些YARN资源设置:
YARN > Configuration > Gateway > Resource Management
YARN > Configuration > ResourceManager > Resource Management
YARN > Configuration > NodeManager > Resource Management
请务必在保存更改后重新启动服务并部署客户端配置(使用“配置”屏幕上的“操作”按钮)。
答案 1 :(得分:0)
我遇到了同样的问题并解决了它增加两个内存分配:
YARN / Configuration / CATEGORY / Resource Management:
映射任务记忆:
mapreduce.map.memory.mb
减少任务记忆:
mapreduce.reduce.memory.mb