jackrusher / spicerack Goto Github PK
View Code? Open in Web Editor NEWA Clojure wrapper for MapDB, which is a fast, disk-persistent data-structures library.
License: Eclipse Public License 1.0
A Clojure wrapper for MapDB, which is a fast, disk-persistent data-structures library.
License: Eclipse Public License 1.0
lein install
creates following warning:
$ lein install
WARNING!!! version ranges found for:
[spicerack "0.1.6"] -> [org.mapdb/mapdb "3.0.7" :exclusions [org.eclipse.collections/eclipse-collections-api org.eclipse.collections/eclipse-collections org.eclipse.collections/eclipse-collections-forkjoin com.google.guava/guava]] -> [org.jetbrains.kotlin/kotlin-stdlib "[1.2.41,1.2.90)"]
Consider using [spicerack "0.1.6" :exclusions [org.jetbrains.kotlin/kotlin-stdlib]].
Created /home/xxx/clojure/clojure2d/utils/palettes/target/palettes-0.1.0-SNAPSHOT.jar
Wrote /home/xxx/clojure/clojure2d/utils/palettes/pom.xml
Installed jar and pom into local repo.
After interrupting a process within an open-database, subsequent calls yield OverlappingFileLockException. I'm not sure how to release this lock since the database object is no longer in scope.
The last concert before I go further. spicerack
seems to work with the file. What if I want to include read-only database in the library bundled in the jar. Such files are later accessible via resource url. How to make it here?
And, ideally, opening a DB read-only
should not attempt to mkdir.
Thanks!
Do you know any way to store objects created by deftype
or defrecord
? (deftype with java.io.Serializable
interface).
Hi, first, thanks for making MapDB wrappings. I wasn't aware it exists.
Quick question: for read only access can I keep opened database around unless JVM is dead? Or should I everytime wrap into with-open
? What is the proper strategy?
Opening and closing DB to access single value can be inefficient, however currently it's 6ms on my laptop which is perfectly ok.
It seems like MapDB allows storing things that it is unable to retrieve, thus rendering the database inaccessible.
I'm not 100% sure what I did here, but it would appear I stored an anonymous function.
Would it be possible to detect cases like these so the error happens when storing the value, rather than later on when retrieving it?
org.mapdb.DBException$SerializationError
at org.mapdb.StoreDirectAbstract.deserialize(StoreDirectAbstract.kt:234)
at org.mapdb.StoreDirect.get(StoreDirect.kt:546)
at org.mapdb.HTreeMap.valueUnwrap(HTreeMap.kt:1198)
at org.mapdb.HTreeMap.getprotected(HTreeMap.kt:644)
at org.mapdb.HTreeMap.containsKey(HTreeMap.kt:584)
at clojure.lang.RT.getFrom(RT.java:786)
at clojure.lang.RT.get(RT.java:778)
at redolist.core$new_routes$fn__58298$fn__58299.invoke(core.clj:51)
at compojure.core$make_route$fn__30790.invoke(core.clj:135)
at compojure.core$wrap_route_middleware$fn__30783.invoke(core.clj:122)
at compojure.core$wrap_route_info$fn__30787.invoke(core.clj:126)
at compojure.core$if_route$fn__30735.invoke(core.clj:45)
at compojure.core$if_method$fn__30725.invoke(core.clj:27)
at compojure.core$routing$fn__30797.invoke(core.clj:151)
at clojure.core$some.invokeStatic(core.clj:2674)
at clojure.core$some.invoke(core.clj:2665)
at compojure.core$routing.invokeStatic(core.clj:151)
at compojure.core$routing.doInvoke(core.clj:148)
at clojure.lang.RestFn.invoke(RestFn.java:460)
at redolist.core$new_routes$fn__58298.invoke(core.clj:49)
at compojure.core$if_context$fn__30861.invoke(core.clj:220)
at compojure.core$routing$fn__30797.invoke(core.clj:151)
at clojure.core$some.invokeStatic(core.clj:2674)
at clojure.core$some.invoke(core.clj:2665)
at compojure.core$routing.invokeStatic(core.clj:151)
at compojure.core$routing.doInvoke(core.clj:148)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$apply.invoke(core.clj:652)
at compojure.core$routes$fn__30801.invoke(core.clj:156)
at compojure.core$routing$fn__30797.invoke(core.clj:151)
at clojure.core$some.invokeStatic(core.clj:2674)
at clojure.core$some.invoke(core.clj:2665)
at compojure.core$routing.invokeStatic(core.clj:151)
at compojure.core$routing.doInvoke(core.clj:148)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$apply.invoke(core.clj:652)
at compojure.core$routes$fn__30801.invoke(core.clj:156)
at ring.middleware.keyword_params$wrap_keyword_params$fn__32128.invoke(keyword_params.clj:35)
at ring.middleware.params$wrap_params$fn__32404.invoke(params.clj:64)
at ring.middleware.absolute_redirects$wrap_absolute_redirects$fn__32578.invoke(absolute_redirects.clj:38)
at ring.middleware.content_type$wrap_content_type$fn__32531.invoke(content_type.clj:30)
at ring.middleware.default_charset$wrap_default_charset$fn__32553.invoke(default_charset.clj:26)
at ring.middleware.not_modified$wrap_not_modified$fn__32506.invoke(not_modified.clj:52)
at ring.middleware.format_params$wrap_format_params$fn__34361.invoke(format_params.clj:119)
at ring.middleware.format_params$wrap_format_params$fn__34361.invoke(format_params.clj:119)
at ring.middleware.format_params$wrap_format_params$fn__34361.invoke(format_params.clj:119)
at ring.middleware.format_params$wrap_format_params$fn__34361.invoke(format_params.clj:119)
at ring.middleware.format_params$wrap_format_params$fn__34361.invoke(format_params.clj:119)
at ring.middleware.format_params$wrap_format_params$fn__34361.invoke(format_params.clj:119)
at ring.middleware.format_response$wrap_format_response$fn__34538.invoke(format_response.clj:194)
at org.httpkit.server.HttpHandler.run(RingHandler.java:91)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: java.lang.ClassNotFoundException: redolist.core$new_routes$fn__58298$fn__58306$fn__58308$fn__58309
at org.mapdb.serializer.SerializerJava.deserialize(SerializerJava.java:30)
at org.mapdb.StoreDirectAbstract.deserialize(StoreDirectAbstract.kt:229)
... 57 more
Caused by: java.lang.ClassNotFoundException: redolist.core$new_routes$fn__58298$fn__58306$fn__58308$fn__58309
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:628)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
at org.mapdb.serializer.SerializerJava.deserialize(SerializerJava.java:28)
... 58 more
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.