2012-04-13 131 views
0

我正在运行Hadoop流式作业。此作业失败,错误:超过Hadoop内存限制

"TaskTree [pid=13549,tipID=attempt_201202130706_121058_m_000000_0] is running beyond memory-limits. Current usage : 1667149824bytes. Limit : 1610612736bytes. Killing task." 

对于这份工作,mapred.job.map.memory.mb设置为1536将此设置为1536*2 = 3072帮助,但会导致1个map任务使用2个插槽,是不可取的。

当我在主机上运行这个作业时,我发现它使用1.07 GB的峰值内存,这是小于1536 MB的方式。我使用“top”和每1秒钟使用"ps -o vsz=${pid}"的脚本验证主机上作业的内存使用情况。

有人可以帮我理解/调试/修复这个问题。

+0

看起来像YARN,您使用的是Hadoop版本? – 2012-04-13 12:10:06

+0

$ hadoop版本 Hadoop 0.20.205.0.3.1112071329 ... – sunillp 2012-04-13 12:54:19

+0

sunillp,请从stackoverflow检查此问题,[链接] http://stackoverflow.com/questions/8017500/specifying-memory-limits-with-hadoop – 2012-04-13 22:56:17

回答

0

这个问题可以用这个错误我在CDH版本here发现有关:

MapReduce task from Hive dynamic partitioning query is killed.

Problem: When using the Hive script to create and populate the partitioned table dynamically, the following error is reported in the TaskTracker log file:

TaskTree [pid=30275,tipID=attempt_201305041854_0350_m_000000_0] is running beyond memory-limits. Current usage : 1619562496bytes. Limit : 1610612736bytes. Killing task. 

你必须在mapred-site.xml中关闭内存设置:

mapred.cluster.map.memory.mb = -1 
mapred.cluster.reduce.memory.mb = -1 
mapred.job.map.memory.mb = -1 
mapred.job.reduce.memory.mb = -1 
mapred.cluster.max.map.memory.mb = -1 
mapred.cluster.max.reduce.memory.mb = -1