db = DBMaker.newFileDB("FileGeneratedOffline").transactionDisable().readOnly().make(); // open the stored file
ConcurrentMap<K, V> map = db.getHashMap(collection); // read data from file.V value = map.get(K); // retrieve values.This works great but I am seeing considerable latencies especially when the "FileGeneratedOffline" is big (in my case it can be 8-10GB).In some sense, I want to be able to load this file in memory (on/off heap). So I tried doing something like the following while creating the DB :db = DBMaker.newFileDB("FileGeneratedOffline").__newMemoryDirectDB().transactionDisable().readOnly().make(); // open the stored fileMy assumption was that adding the _newMemoryDirectDB would open the DBFile and store the results of fetches from the file into "direct memory". I am guessing this istotally wrong/incorrect but I wanted some of the MapDB experts out there to confirm the same :-).If the above is wrong, is there any way I can have MapDB provide me a mechanism where I can "load" an existing MapDB file into direct memory? I am guessing theonly way would be to create a second db with _newMemoryDirectDB() and copy the contents manually from the original mapDB file at startup. Are there otherapproaches? Would appreciate feedback from others as to what you may have done in your use cases.Apologies if this question has already been asked in the mailing list (my cursory search didn't yield any).Venkatesh
I am a newbie to MapDB and have some basic questions on it's usage. I have a use case where I want to consume a MapDB file generated offline. I see in the mailing list that the simplest way would be do something like the following:db = DBMaker.newFileDB("FileGeneratedOffline").transactionDisable().readOnly().make(); // open the stored fileConcurrentMap<K, V> map = db.getHashMap(collection); // read data from file.V value = map.get(K); // retrieve values.This works great but I am seeing considerable latencies especially when the "FileGeneratedOffline" is big (in my case it can be 8-10GB).
Hi,
in MapDB 1.0 and 2.0 there is no official way to load file into memory.
__XXX methods are internal, they were exposed by accident.
I updated documentation which covers caching for not yet stable 3.0
http://www.mapdb.org/doc/volume/
Jan
--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+unsubscribe@googlegroups.com.
3.0 will enter beta this week. If you need this urgently, I would recommend you to start using it.
Jan
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+unsubscribe@googlegroups.com.
Hi,
would you post an stack trace? In memory heap store should be independent on file, once data are copied.
Jan
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "MapDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapdb+un...@googlegroups.com.