关于mapreduce的topN的问题

本文讨论了一位同事在处理大规模数据时遇到的MapReduce任务问题,任务目标是对几十TB的数据进行全排序并获取TopN。由于在reduce阶段使用列表进行排序和存储,导致内存不足。解决方案包括在reduce中维护固定大小的TopN列表并在清理阶段写出,以及利用TotalOrderPartitioner进行范围分区和递增排序,避免内存压力。对于更大的TopN需求,可以考虑使用MR链式解决方法。
摘要由CSDN通过智能技术生成

前段时间有位同事的mr在集群上时而通过时而挂掉, 错误是

2015-12-28 11:13:26,013 INFO [main] org.apache.hadoop.mapred.Merger: Down to the last merge-pass, with 2 segments left of total size: 1640163582 bytes
2015-12-28 11:13:26,096 INFO [main] org.apache.hadoop.conf.Configuration.deprecation: mapred.skip.on is deprecated. Instead, use mapreduce.job.skiprecords
2015-12-28 11:17:39,744 WARN [IPC Client (2008966511) connection to BJ-PRESTO-200083.jd.com/172.16.200.83:8020 from mart_cmo] org.apache.hadoop.ipc.Client: Unexpected error reading responses on connection Thread[IPC Client (2008966511) connection to BJ-PRESTO-200083.jd.com/172.16.200.83:8020 from mart_cmo,5,main]
java.lang.OutOfMemoryError: GC overhead limit exceeded
2015-12-28 11:17:39,745 FATAL [main] org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.OutOfMemoryError: GC overh
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值