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
10
votes
2 answers

Using MapDB efficiently (confused about commits)

I'm using MapDB in a project that deals with billions of Objects that need to be mapped/queued. I don't need any kind of persistence after the program finishes (the MapDB databases are all temporary). I want the program to run as fast as possible,…
user1008893
7
votes
1 answer

Serialization of domain objects in MapDB

In my mapdb application, for example, I have a simple domain object Course: import java.io.Serializable; class Course implements Serializable { private static final long serialVersionUID = 1L; String cID; String name; String teacherName; …
pitosalas
  • 10,286
  • 12
  • 72
  • 120
6
votes
4 answers

MapDB ClassNotFoundException: kotlin.jvm.internal.Intrinsics

I am trying to run a simple mapdb example, but get the error: Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics at org.mapdb.DBMaker.fileDB(DBMaker.kt) at leechies.Truc.main(Truc.java:9) Caused by:…
Tyvain
  • 2,640
  • 6
  • 36
  • 70
5
votes
4 answers

Hazelcast and MapDB - implementing a simple distributed database

I have implemented a hazelcast service which stores its data into local mapdb instances via MapStoreFactory and newMapLoader. This way the keys can be loaded if a cluster restart is necessary: public class HCMapStore implements MapStore
Karussell
  • 17,085
  • 16
  • 97
  • 197
4
votes
0 answers

Java MapDB: how to handle "already open" exception?

I am new in using MapDB in Java. import org.mapdb.*; void foo () { DB db = DBMaker.fileDB ("map.db").make (); // some code db.close (); } If the program crashed in "some code", then the make () would throw an exception. File is already…
chris01
  • 10,921
  • 9
  • 54
  • 93
4
votes
1 answer

Best practices for using MapDB with Android

What is the best way to use MapDB with Android, especially with regards to the Activity lifecycle? Will keeping a singleton instance of DB around cause memory issues as long as all map instances are garbage collected correctly? What will happen if…
Kirill Rakhman
  • 42,195
  • 18
  • 124
  • 148
3
votes
1 answer

MapDB files not deleted after the map.clear() method

I am using MapDB for key-value database for the better performace.After the map.clear() my files are not deleted in disk.I need to reclaim the diskspace after the remove() or clear() method.Below are the my code sippet. public static void…
Balakumar S
  • 31
  • 1
  • 6
3
votes
0 answers

mapDb store list object in off heap or file

I want to use mapDb to store List object syntax wise not throwing any error, but after getting data for map getting class cast exception. but I do see below warnings in eclipse: Multiple markers at this line Type safety: The expression of type…
3
votes
1 answer

Race condition in synchronized arraylist

I am enclosing processing of list of objects in a synchronized block, but ended up in race condition. Am I using the synchronized block wrongly or is there any other problem with my code? The list is actually instantiated with mapdb. private static…
Anitha.R
  • 344
  • 2
  • 15
3
votes
0 answers

MapDB background compaction

For one of our projects, I'm using MapDB as a persistent Key/Value store. I'm using HTreeMap backed by a file and would like to know how I can enable compaction in the background. final DB mapDB =…
chandra_cst
  • 307
  • 2
  • 13
3
votes
1 answer

MapDB db.commit() db.close() usage and problems

I can't understand where and when I have to put these two instruction when using MapDB: db.commit() db.close() Commit is for when I modify the data in the db, ok. But every time I instantiate this kind of objects in a method (that is, every…
JamieITGirl
  • 161
  • 1
  • 11
3
votes
1 answer

Using Clojure's data structure with MapDB

I tried to use directly Clojure's hashmap with MapDB and ran into weird behaviour. I checked Clojure and MapDB sources and couldn't understand the problem. First everything looks fine: lein try org.mapdb/mapdb "1.0.6" ; defining a db for the first…
lerouxrgd
  • 33
  • 3
3
votes
2 answers

MapDB vs regular database

When one should use MapDb vs regular database through an ORM? Other than having a direct mapping to Java.util.Map which can be implemented as well with an ORM.
Janek
  • 1,441
  • 2
  • 19
  • 28
3
votes
1 answer

MapDB flash friendliness

I'm exploring MapDB utility to be used as a off-heap java cache backed by a SSD. Can someone suggest if it supports following: Is device access to SSD device "flash friendly" i.e. access are pages aligned. Does it allow inserting keys to the device…
Ata
  • 153
  • 1
  • 9
2
votes
1 answer

How to restore data from MapDB wal (write ahead log) files?

My objective is to enable MapDB crash protection and if a crash happens, how to restore data. I have enabled transaction for MapDB DB db; HTreeMap< String, String > mapDb; db = DBMaker.fileDB( "walTest/file1.db" ) .transactionEnable() …
Tilak De
  • 141
  • 2
1
2 3 4 5 6 7