This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-27
Channels
- # aws-lambda (2)
- # babashka (22)
- # beginners (188)
- # calva (24)
- # cider (16)
- # clj-kondo (2)
- # cljfx (5)
- # clojars (15)
- # clojure (146)
- # clojure-czech (1)
- # clojure-europe (10)
- # clojure-france (3)
- # clojure-provo (1)
- # clojure-sweden (8)
- # clojure-uk (6)
- # clojurescript (28)
- # conjure (3)
- # core-logic (1)
- # cursive (13)
- # datahike (2)
- # datomic (18)
- # defnpodcast (2)
- # figwheel-main (2)
- # fulcro (1)
- # honeysql (4)
- # hoplon (21)
- # jobs (3)
- # jobs-rus (1)
- # kaocha (5)
- # off-topic (49)
- # pathom (86)
- # reagent (4)
- # remote-jobs (2)
- # ring (4)
- # schema (1)
- # shadow-cljs (40)
- # spacemacs (12)
- # sql (20)
- # startup-in-a-month (30)
- # xtdb (19)
I am trying to get Crux running with RockDB persistence and running into an errors:
(ns gbd.crux
(:require
[crux.api :as crux]
[crux.rocksdb]))
(def system
(crux/start-node
{:crux/tx-log
{:kv-store
{:crux/module crux.rocksdb/->kv-store
:db-dir "tx-log"}}
:crux/document-store
{:kv-store
{:crux/module crux.rocksdb/->kv-store
:db-dir "docs"}}
:crux/index-store
{:kv-store
{:crux/module crux.rocksdb/->kv-store
:db-dir "indexes"}}}))
Using Cursive on Windows with Lein.What version of Crux are you running?
It looks like you're missing the quotes for the crux.rocksdb/->kv-store symbols, did you already try that?
I am running the latest version.
I got it running with a later-posted code block. Thanks for the feedback though.
For this version though, do you mean a quoted symbol like 'crux.rocksdb/->kv-store
?
Folder Structure
error:
Execution error (ClassCastException) at crux.rocksdb/->kv-store$fn (rocksdb.clj:158).
class java.lang.String cannot be cast to class java.nio.file.Path (java.lang.String and java.nio.file.Path are in module java.base of loader 'bootstrap')
also getting:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
but not sure if that's criticalI am loading this namespace into the repl, on demand...
(crux/start-node {})
seems to workAny help would be greatly appreciated. Thanks.
@chromalchemy You probably want a Crux config something like this:
(defn kv-store [dir]
{:kv-store {:crux/module 'crux.rocksdb/->kv-store
:db-dir (io/file dir)
:sync? true}})
(crux/start-node
{:crux/tx-log (kv-store "tx-log")
:crux/document-store (kv-store "docs")
:crux/index-store (kv-store "indexes")})
This is working!!!! I guess I need to have http://clojure.java.io reqired. Thank you for the elaboration. Requiring:
[com.fzakaria/slf4j-timbre "0.3.20"]
Silenced the SLF4J warnings.hey is there an alternative for this repo: https://github.com/crux-labs/crux-console?
Hey 🙂 we actually built a different iteration of the console UI directly on top of the existing crux-http-server
routes - so just add that module to your deps + config and run start-node
as usual, then you can open up the URLs in your browser to see HTML (as well as use curl to get json or edn)
Docs are here: https://www.opencrux.com/reference/http.html — though that should probably be [juxt/crux-http-server "21.01-1.14.0-alpha"]
cool thank you