I am writing a program that reads a huge amount of data from the hard disk and creates a hashmap from this data, then I do some processing that changes this initial hashmap a little. My problem, everytime I run my program, I create the same hashmap from the same data (lets call this the initial hashmap). Only the processing differs from one run to run. Is there anyway, I can create this hashmap once and save it persistently? Will serialization help?
Share
It’s a well known problem, there are many solutions ,among them I would suggest two:
1. save the hashmap in a sql database table with the primary key column containing the key values and another column containing the corresponding values;
2. use a nosql data store, there are many of them, among the others Redis or SimpleDb.