This file contains 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
;; Protocol defining output with external logic: | |
(defprotocol Outputter (output [self logic])) | |
;; Simple record: | |
(defrecord Person [name]) | |
;; Two protocol definitions: |
This file contains 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 clamq-samples1 (:use [clamq.protocol] [clamq.jms] [clamq.activemq] [clamq.rabbitmq] [clamq.pipes])) | |
(def activemq (jms-connection (activemq-connection "tcp://localhost:61616"))) | |
(def rabbitmq (rabbitmq-connection "localhost")) | |
(open | |
(pipe { | |
:from {:connection activemq :endpoint "activemq"} | |
:to {:connection rabbitmq :endpoint {:routing-key "rabbitmq"}} | |
:transacted true |
This file contains 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
package jmh.countdownlatch; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.TimeUnit; | |
import org.openjdk.jmh.annotations.BenchmarkMode; | |
import org.openjdk.jmh.annotations.GenerateMicroBenchmark; | |
import org.openjdk.jmh.annotations.Mode; | |
import org.openjdk.jmh.annotations.OutputTimeUnit; | |
import org.openjdk.jmh.annotations.Scope; | |
import org.openjdk.jmh.annotations.Setup; |
This file contains 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
SEQUENTIAL | |
CQL|SELECT * FROM demo.geo WHERE solr_query='{"q":"*:*","fq":"country:AS"}' LIMIT 1 | |
CQL|SELECT * FROM demo.geo WHERE solr_query='{"q":"*:*","fq":"name:Reka"}' LIMIT 1 | |
CQL|SELECT * FROM demo.geo WHERE solr_query='{"q":"*:*","fq":"published:2016-04-12"}' LIMIT 1 | |
CQL|SELECT * FROM demo.geo WHERE solr_query='{"q":"*:*","fq":"published:2015-01-07"}' LIMIT 1 | |
CQL|SELECT * FROM demo.geo WHERE solr_query='{"q":"*:*","fq":"name:Santa"}' LIMIT 1 | |
CQL|SELECT * FROM demo.geo WHERE solr_query='{"q":"*:*","fq":"name:Landing"}' LIMIT 1 | |
CQL|SELECT * FROM demo.geo WHERE solr_query='{"q":"*:*","fq":"name:Nāw"}' LIMIT 1 | |
CQL|SELECT * FROM demo.geo WHERE solr_query='{"q":"*:*","fq":"published:1999-04-30"}' LIMIT 1 | |
CQL|SELECT * FROM demo.geo WHERE solr_query='{"q":"*:*","fq":"name:Serra"}' LIMIT 1 |
This file contains 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
======= | |
Copyright DataStax, Inc. | |
Please see the included license file for details. | |
--> | |
<!-- |
This file contains 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
How to run ETCD on K8S locally | |
1. Install any local K8S distribution. I've used microk8s: https://microk8s.io/ | |
2. Install etcd so you can use etcdctl: https://github.com/etcd-io/etcd/releases/ | |
3. Run etcd on k8s via the Bitnami image. Using microk8s: | |
$> microk8s kubectl run --image=bitnami/etcd:latest etcd --env ALLOW_NONE_AUTHENTICATION=yes --labels app=etcd |
This file contains 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
description: | | |
A workload with text keys, text values and range queries. | |
bindings: | |
seq_key: Mod(TEMPLATE(keycount,1000000000)); ToString(); | |
seq_value: >- | |
Hash(); | |
Mod(TEMPLATE(valuecount,1000000000)); | |
CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,100000)TEMPLATE(addzeroes,),TEMPLATE(maxtext,500000)TEMPLATE(addzeroes,))); | |
ToString(); |
This file contains 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
description: | | |
A workload with text keys, ~1kb text values and SAI. | |
scenarios: | |
default: | |
schema: run driver=cql tags==block:schema threads==1 cycles==UNDEF | |
rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto | |
main: run driver=cql tags==block:"main.*" cycles===TEMPLATE(main-cycles,10000000) threads=auto | |
bindings: |
This file contains 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
description: | | |
A key-value workload with small and large values to test large messages | |
bindings: | |
large_rw_key: TEMPLATE(keydist,Uniform(0,1000000000)); | |
large_rw_value: Hash(); TEMPLATE(valdist,Uniform(0,1000000000)); CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,100000)TEMPLATE(addzeros,),TEMPLATE(maxtext,250000)TEMPLATE(addzeros,))); ToString(); | |
small_rw_key: TEMPLATE(keydist,Uniform(1000000001,2000000000)); | |
small_rw_value: Hash(); TEMPLATE(valdist,Uniform(0,1000000000)); CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,50)TEMPLATE(addzeros,),TEMPLATE(maxtext,100)TEMPLATE(addzeros,))); ToString(); | |
This file contains 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
description: | | |
A key-value workload with batches over large values to test large batches | |
bindings: | |
rw_key: TEMPLATE(keydist,Uniform(0,1000000000)); | |
large_rw_value: Hash(); TEMPLATE(valdist,Uniform(0,1000000000)); CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,250000)TEMPLATE(addzeros,),TEMPLATE(maxtext,500000)TEMPLATE(addzeros,))); ToString(); | |
blocks: | |
- tags: | |
phase: schema |