【发布时间】:2014-09-25 14:55:14
【问题描述】:
我有简单的映射器和以下简单的reducer(它是通过一个字段连接两个大表):
protected void reduce(StringLongCompositeKey key, Iterable<Text> values, Context context)
throws IOException, InterruptedException {}
foreach(Text text : values) {
// do some operations with one record and then emit it using context.write
// so nothing is storing in memory, one text record is small (mo more then 1000 chars)
}
}
但我收到以下错误
14/09/25 17:54:59 INFO mapreduce.Job: map 100% reduce 28%
25 年 14 月 9 日 17:57:14 信息 mapreduce.Job:任务 ID:尝试_1410255753549_9772_r_000020_0,状态:失败
容器 [pid=24481,containerID=container_1410255753549_9772_01_001594] 运行超出物理内存限制。当前使用情况:使用了 4.1 GB 的 4 GB 物理内存;使用了 4.8 GB 的 8.4 GB 虚拟内存。杀死容器。
有一个细微差别-)
Iterable<Text> values
很长!正如我之前考虑的那样,并且仍然相信 Iterable 按需加载下一条记录是正确的,hadoop 处理它应该没有问题,而不会消耗大量 RAM。
在改组或排序时会出现此错误吗?有没有关于处理长序列的特殊信息?
【问题讨论】: