V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
johnsneakers
V2EX  ›  问与答

多个千万级行数的文件,最快的求交集处理是怎么样的。

  •  
  •   johnsneakers · Sep 22, 2016 · 2050 views
    This topic created in 3505 days ago, the information mentioned may be changed or developed.
    内容都是 uid\n , shell comm 效果不是很理想。

    内容如下:
    4234234
    123342
    42342
    3523423
    23423
    5 replies    2016-09-22 18:44:00 +08:00
    ldbC5uTBj11yaeh5
        1
    ldbC5uTBj11yaeh5  
       Sep 22, 2016
    挂个 tmpfs, 把文件放到上面去,加上 export LC_ALL=C, 然后再用 comm
    HunterPan
        2
    HunterPan  
       Sep 22, 2016
    spark so easy
    jininij
        3
    jininij  
       Sep 22, 2016 via Android
    排序后求交集,复杂度仅为 1 。
    hinate
        4
    hinate  
       Sep 22, 2016 via Android
    load 到 hive 里面,查询
    zhizhongzhiwai
        5
    zhizhongzhiwai  
       Sep 22, 2016
    @jigloo niubility
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1186 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 23:10 · PVG 07:10 · LAX 16:10 · JFK 19:10
    ♥ Do have faith in what you're doing.