Questions tagged [mapdb]

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap memory

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap memory. It is a fast and easy to use embedded Java database engine. And it is completely free under Apache License. MapDB is free as speech and free as beer under Apache License 2.0.

101 questions
2
votes
1 answer

org.mapdb.DBException$SerializationError when storing JSONArray in MapDB using ELSA Serialization

I have a class that store a Long value and JSONArray. Class SomeClass { private Long longValue; private JSONArray jsonArray; //Default and parameterised constructors. //Getters and Setters. } I'm storing these values in a…
Rishi
  • 46
  • 1
  • 8
2
votes
0 answers

MapDB: How to remove a HashMap?

I have a MapDB with multiple HashMaps. DBMaker.Maker mapmk = DBMaker.fileDB (this.dbfile); DB mapdb = mapmk.make (); HTreeMap map1 = mapdb.hashMap ("abc").createOrOpen (); map1.put("max", "123"); HTreeMap
chris01
  • 10,921
  • 9
  • 54
  • 93
2
votes
0 answers

MapDB | reading in batches

How do I read records from MapDB in batches, instead of reading all at once ? I have a list of say 1,000 records that I have persisted on disk through MapDB. private fun storeRecordsInFile(records : List): String { val fileName =…
Scrooge McD
  • 335
  • 1
  • 3
  • 12
2
votes
1 answer

How do you delete and rename tables from MapDB 3.x?

In MapDB 1.x, you could easily delete tables from the MapDB by calling db.delete("table name") and db.rename("old table name", "new table name"). But there seems to be no API functionality to do either of the above anymore. How do you delete and…
Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152
2
votes
0 answers

Good Performance of old MapDB 0.9.0

Why is the Performance of the older MapDB 0.9.0 release better than the newest MapDB 3.0 releases? My division works with BigData and analytics and it's necessary to finish tasks very fast. I've tried in a current Java software project an update to…
2
votes
1 answer

MapDb 3.0 Pump Example

Can anyone provide pump API example usage for mapdb 3.0 ? Something similar to this in 1.0.9
Shaan
  • 31
  • 6
2
votes
0 answers

Storing 10 million objects and modifyign them in a fastest way for Java application

I have a requirement to deal with 10 million objects. There can be 10,000 updates for objects per second. I am not sure it is good to store all of these objects in memory (JVM as this is a java application). But as I need performance (10,000…
lsc
  • 681
  • 3
  • 8
  • 26
2
votes
2 answers

MapDB deprecated functions

I'm programming in Android Studio. I'm using the mapDB, 2.0-beta8 version. I have created my own class SingleCase, I also defined a static variable: static ConcurrentNavigableMap map; after initialize the data base: db =…
shahar
  • 31
  • 2
2
votes
1 answer

Efficient serialization of JSON values in MapDB

I am using MapDB and want to store JSON values in a BTreeMap. As far as I understand, there is no (default) Serializer for JSON values. I know I can implement one myself. But because this is probably a very common use case, i wonder if there are…
rmuller
  • 12,062
  • 4
  • 64
  • 92
2
votes
0 answers

java.io.IOException: Wrong index checksum, store was not closed properly and could be corrupted

I encountered the exception after restarting Jetty, which contains producer-consumer implementation via MapDB's Queue. I haven't call "DBMaker.transactionDisable()", but why did I still get the above exceptions? Before I restarted Jetty, I found the…
Po Zhou
  • 595
  • 1
  • 5
  • 17
2
votes
1 answer

How to sort items for faster insertion in the MapDB BTree?

so I have a list of around 20 million key value pairs, and I'm storing the data in several MapDB's differently to see how it affects my programs performance, and for experiment sake. The thing is, it takes quite a lot of time to insert (in random…
rudy
  • 103
  • 12
2
votes
1 answer

MapDB batch import perfomance

Is it possible to improve mapdb's HTreeMap perfomance on huge datasets by means of adding blocks of records instead of adding them one-by-one? I use filesystem.
Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206
2
votes
1 answer

Serialize and Deeserialize object in mapDb - Java

i'm trying to serialaze and deserialize an object to store it in mapDb. I managed to serialize the Object using this snippet: ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream os = new…
user3457185
  • 175
  • 1
  • 1
  • 7
2
votes
1 answer

mapdb how to persist cross restart

I use mapdb as following val mycache = DBMaker.newFileDB(new File(("/data/tmp/cache.db"))) .transactionDisable() .make().getHashSet("") then when i do mycache.put(k1, v1) assertTrue(mycache.get(k1), v1) // all is fine however if i restart…
Jas
  • 14,493
  • 27
  • 97
  • 148
2
votes
2 answers

How to use byte arrays as keys in MapDB

I have a use case where I'd like to use opaque byte[] as keys into a MapDb. I discovered this - Using a byte array as Map key - limitation quickly; and wonder which approach is recommended. I'd rather not create a bunch of interim objects and…
Nino Walker
  • 2,742
  • 22
  • 30