• 请不要在回答技术问题时复制粘贴 AI 生成的内容
orbwalker
V2EX  ›  程序员

# 关于 mapreduce 的 topN 源码

  •  
  •   orbwalker · Oct 14, 2019 · 1652 views
    This topic created in 2424 days ago, the information mentioned may be changed or developed.

    看了一下 mr 的 example 包,里面没看到有写 topN 的例子,
    总感觉我们导师写的东西不行,我想看看更加规范的写法。

    请问,Hadoop 有官方的 topN 例子吗?
    2 replies    2019-10-15 09:18:15 +08:00
    Allianzcortex
        1
    Allianzcortex  
       Oct 14, 2019
    有一本 MapReduce Design Patterns 的书: http://shop.oreilly.com/product/0636920025122.do
    petelin
        2
    petelin  
       Oct 15, 2019 via iPhone   ❤️ 1
    topN 流程就是 map ( key,1 ) reduce 合并 values。之后遍历所有的 key 就可以了吧?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1022 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 22:09 · PVG 06:09 · LAX 15:09 · JFK 18:09
    ♥ Do have faith in what you're doing.