在编写myjob时,报错:is running 221518336B beyond the ‘VIRTUAL‘ memory limit. Current usage: 74.0 MB of 1 GB physical memory used; 2.3 GB of 2.1 GB virtual memory used. Killing container.
此问题原因是container在申请多余的内存时,被resouremanager杀掉了,
此处可修改hadoop/etc/mapred-site.xml
添加配置信息
<property>
<name>mapreduce.map.memory.mb</name>
<value>1536</value>
</property>
<property>
<name>mapreduce.map.java.opts</name>
<value>-Xmx1024M</value>
</property>
<property>
<name>mapreduce.reduce.memory.mb</name>
<value>3072</value>
</property>
<property>
<name>mapreduce.reduce.java.opts</name>
<value>-Xmx2560M</value>
</property>
然后重启整个haodoop模块
重新提交任务
原文:https://www.cnblogs.com/hhaahh/p/14713502.html