问题
Is there an efficient Java implementation of a filesystem-based key-value storage with the following features:
- Store, overwrite, and retrieve byte arrays by a unique ID (may be assigned by the storage)
- No memory caching (read means read from file system, write means write to file system immediately)
- Total data size up to few terabytes
- Number of stored objects up to hundreds of millions
- Manageable number of file system objects (to move/copy/delete entire storage on file system level)
Will Berkeley DB JE do?
回答1:
Simply format a dedicated partition with a file system of your choice? The file system would meet requirements 1-4, and requirement 5 can be met by moving/copying or deleting that partition.
回答2:
I suggest MapDB, MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap memory. Lightweight and hackable.
回答3:
This may work. Looks like your case. Suppose, worth having a look.
http://xtreemfs.blogspot.com/2008/11/babudb-efficient-key-value-store-for.html
Here is also presentation about that thing with details how it works:
http://www.xtreemfs.org/slides/BabuDB-SNAPI.pdf
回答4:
Perhaps HBase, however you would need to run the whole Hadoop stack, which may well be overkill! http://hbase.apache.org/
来源:https://stackoverflow.com/questions/8509638/java-disk-based-key-value-storage