johnsneakers
V2EX  ›  问与答

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

  •  
  •   johnsneakers · 2016년 9월 22일 · 2202 조회수
    3581일 지난 토픽입니다. 언급된 정보가 변경되었을 수 있습니다.
    内容都是 uid\n , shell comm 效果不是很理想。

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