Sort a file with huge volume of data given memory constraint

前端 未结 12 1060
暖寄归人
暖寄归人 2020-11-28 21:47

Points:

  • We process thousands of flat files in a day, concurrently.
  • Memory constraint is a major issue.
  • We use thread for each file process
12条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 22:30

    It looks like what you are looking for is external sorting.

    Basically, you sort small chunks of data first, write it back to the disk and then iterate over those to sort all.

提交回复
热议问题