【问题标题】:Why is the number of combiner input records more than the number of outputs of maps?为什么组合器输入记录的数量多于地图的输出数量?
【发布时间】:2012-08-29 06:21:28
【问题描述】:

Combiner 在 Mapper 之后和 Reducer 之前运行,它将接收给定节点上 Mapper 实例发出的所有数据作为输入。然后它向 Reducers 发出输出。所以组合器输入的记录应该少于地图输出。

12/08/29 13:38:49 INFO mapred.JobClient:   Map-Reduce Framework

12/08/29 13:38:49 INFO mapred.JobClient:     Reduce input groups=8649

12/08/29 13:38:49 INFO mapred.JobClient:     Map output materialized bytes=306210

12/08/29 13:38:49 INFO mapred.JobClient:     Combine output records=859412

12/08/29 13:38:49 INFO mapred.JobClient:     Map input records=457272

12/08/29 13:38:49 INFO mapred.JobClient:     Reduce shuffle bytes=0

12/08/29 13:38:49 INFO mapred.JobClient:     Reduce output records=8649

12/08/29 13:38:49 INFO mapred.JobClient:     Spilled Records=1632334

12/08/29 13:38:49 INFO mapred.JobClient:     Map output bytes=331837344

12/08/29 13:38:49 INFO mapred.JobClient:     **Combine input records=26154506**

12/08/29 13:38:49 INFO mapred.JobClient:     **Map output records=25312392**

12/08/29 13:38:49 INFO mapred.JobClient:     SPLIT_RAW_BYTES=218

12/08/29 13:38:49 INFO mapred.JobClient:     Reduce input records=17298

【问题讨论】:

    标签: hadoop mapreduce combiners


    【解决方案1】:

    我认为这是因为Combiner 也可以在之前的Combine 步骤的输出上运行,因为您的Combiner 运行并生成新记录,然后将这些记录与来自您的Mappers 的其他记录相结合。也可能是Map输出记录是在Combiner运行之后才计算出来的,这意味着记录少了,因为有些已经被Combined了。

    【讨论】:

    • 是的,我同意你的观点。使用和不使用combine的答案是相同且正确的,所以我认为combine中有一个轮询过程。
    • 我猜这也是reduce输入记录远少于combin输出记录的原因(中间结果也算在内)?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-04
    • 1970-01-01
    • 2016-02-14
    • 1970-01-01
    • 2023-03-13
    相关资源
    最近更新 更多