Java – key value storage recommendations
•
Java
I need a very basic key value stored as Java I started to use HashMap, but it seems that some space in HashMap is invalid (I am storing about 20 million records, and it seems that ~ 6GB ram is required)
The mapping is map < integer, string >, etc., so I am considering using GNU trove tintobjecthashmap < byte [] >, and storing the mapping value as ASCII byte array instead of string
As an alternative, is there a key value store that only needs to add jar files, does not immediately save the entire map in RAM, and is still quite fast?
Solution
Using Berkeley DB
This will definitely bring you great memory and speed without increasing the complexity of your application Please enjoy!
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码