This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
535-8812 SOLO: | |
;;TEMP ID in TUPLE does not RESOLVE: see `-9223358842714242486` | |
user=> (def cfg {:server-type :ion | |
:region "us-east-1" ;; e.g. us-east-1 | |
:system "toy-solo-4" | |
:endpoint "http://entry.toy-solo-4.us-east-1.datomic.net:8182/" | |
:proxy-port 8182}) | |
#'tomhanks.tempid-tuple/cfg | |
user=> (def client (d/client cfg)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;First transaction | |
(d/transact conn {:tx-data [{:db/ident :account/id | |
:db/valueType :db.type/uuid | |
:db/cardinality :db.cardinality/one | |
:db/unique :db.unique/identity | |
:db/doc "foo"}]}) | |
=> | |
{:db-before {:database-id "datomic:dev://localhost:4334/mbrainz-1968-1973", | |
:db-name "mbrainz", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns datomic-db | |
(:require [datomic.api :as d])) | |
(def schema-tx [{:db/ident :person/id | |
:db/cardinality :db.cardinality/one | |
:db/unique :db.unique/identity | |
:db/valueType :db.type/string} | |
{:db/ident :person/dept | |
:db/cardinality :db.cardinality/one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;Transactor | |
$ bin/transactor ~/Downloads/support-logs/1932-workframe/dev-transactor.properties | |
Launching with Java options -server -Xms1g -Xmx1g -XX:+UseG1GC -XX:MaxGCPauseMillis=50 | |
Starting datomic:dev://0.0.0.0:4334/<DB-NAME>, storing data in: data ... | |
System started datomic:dev://0.0.0.0:4334/<DB-NAME>, storing data in: data | |
;;Connecting with a REPL from datomic distribution: | |
$ bin/repl | |
Clojure 1.9.0 | |
user=> (require '[datomic.api :as d]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RESULTS: | |
=> #'datomic.or.join/db | |
(d/q '[:find ?id :in $ ?l [?d ...] | |
:where | |
(or-join [?e ?l ?d] [?e :resource/label ?l] [?e :resource/description ?d]) | |
[?e :resource/id ?id] ] | |
db "label 1" ["desc1"]) | |
=> [[123] [124]] | |
(d/q '[:find ?id :in $ ?l [?d ...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Rules I implemented to test. Results show that using any clojure core function in a rule results in an error | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;I created one without any clojure core function. It worked. | |
(def all2 | |
'[[(item-info ?type ?sku ?color ?size) | |
[?item :inv/type ?type] | |
[?item :inv/sku ?sku] | |
[?item :inv/color ?color] | |
[?item :inv/size ?size] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~Testing upgrading httpclient 4.5.3 and artemis-core-client 2.6.2~ | |
Methodology: Download 5703 datomic pro. Remove httpclient and artemis-core-client jars from lib directory. Replace with updated jars 4.5.3 and 2.6.2 respectively. Update pom.xml to reflect new versions. Launch bin/repl or bin/transactor and test | |
;;Connecting updated peer to non-updated transactor: | |
jbin at Jarets-MacBook-Pro in ~/Desktop/Jaret/Tools/releasetest/depstestpeer/on-prem-state-farm/datomic-pro-0.9.5703 | |
$ bin/repl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Retracting unique | |
(d/transact conn {:tx-data [[:db/retract :abstractRelease/gid :db/unique :db.unique/identity]]}) | |
=> | |
{:db-before {:database-id "ba146c1e-3d87-49d9-8c6c-f2a2512fdf51", | |
:db-name "mbrainz-subset", | |
:t 33, | |
:next-t 34, | |
:type :datomic.client/db}, | |
:db-after {:database-id "ba146c1e-3d87-49d9-8c6c-f2a2512fdf51", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ $.Msg = "ResourceUtilization" } | |
(ns cloud-tester.core) | |
(require '[datomic.client.api :as d]) | |
(def cfg {:server-type :cloud | |
:region "us-east-1" ;; e.g. us-east-1 | |
:system "jaret-lambda-test" | |
:query-group "jaret-lambda-test" | |
:endpoint "http://entry.jaret-lambda-test.us-east-1.datomic.net:8182/" | |
:proxy-port 8182}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.java.io :as io] | |
'[clojure.edn :as edn] | |
'[clojure.string :as str]) | |
(defn metaspace-burner | |
[timings-file] | |
(future | |
(with-open [f (io/writer (io/file timings-file))] | |
(binding [*out* f ] | |
(loop [] |
NewerOlder