Best way to create a hashmap of arraylist

后端 未结 9 1064
小鲜肉
小鲜肉 2020-11-27 05:35

I have one million rows of data in .txt format. the format is very simple. For each row:

user1,value1
user2,value2
user3,value3
user1,value4
...

You k

9条回答
  •  日久生厌
    2020-11-27 06:15

    As already mentioned, MultiMap is your best option.

    Depending on your business requirements or constraints on the data file, you may want to consider doing a one-off sorting of it, to make it more optimised for loading.

提交回复
热议问题