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
module github.com/JensRantil/kafka-pinger | |
go 1.15 | |
require ( | |
github.com/frankban/quicktest v1.11.3 // indirect | |
github.com/golang/protobuf v1.5.1 // indirect | |
github.com/golang/snappy v0.0.2 // indirect | |
github.com/klauspost/compress v1.11.7 // indirect | |
github.com/kr/text v0.2.0 // indirect |
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
#!/bin/bash | |
# | |
# Counts number of tombstones per partition key in one or multiple sstables. | |
# | |
# Usage: ./tombstone-count.sh /var/lib/cassandra/data/mykeyspace/mytable/*-Data.db | |
# | |
# Sample output: | |
# "40e6a9839bf44bdaa624cc53e96733fe" 8 | |
# "8e177ab222c14f868bcb6d2922b18d2b" 8 | |
# "28aaa9db0dad4ae78cabe8bcc25d14a3" 9 |
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
import random | |
# Number of VMs that will be restarted. | |
N=16 | |
# Bucket the nodes randomly by hashing their hostnames and putting them in hourly buckets. | |
BUCKETS = 7*24 | |
# Number of simulations we will make. | |
SIMULATIONS=100000 | |
collisions = 0 |
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
{ | |
"_id": "_design/eventProjections", | |
"views": { | |
"map": "function(doc) { | |
if (doc.aggregateType=='contact' && | |
(doc.event.type=='ContactCreated' || | |
doc.event.type=='DescriptionChanged') && | |
doc.event.description) { | |
var colon = doc._id.indexOf(':'); | |
var version = parseInt(doc._id.substr(colon + 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
./bin/kafka-topics.sh --if-not-exists --zookeeper $(grep -E zookeeper.connect= ./config/server.properties | cut -d= -f2) --create --partitions 12 --replication-factor 3 --topic my-topic-1 --config retention.ms=3600000 --config min.insync.replicas=2 | |
./bin/kafka-topics.sh --if-not-exists --zookeeper $(grep -E zookeeper.connect= ./config/server.properties | cut -d= -f2) --create --partitions 1 --replication-factor 3 --topic my-topic-2 --config min.insync.replicas=2 |
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
module github.com/JensRantil/yo | |
go 1.13 | |
require github.com/nats-io/nats-streaming-server v0.16.2 |
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
func ingest(out <-chan []string) { | |
out <- []string{"aaaa", "bbb"} | |
out <- []string{"cccccc", "dddddd"} | |
out <- []string{"e", "fffff", "g"} | |
close(out) | |
} | |
func process(in <-chan []string, out <-chan int) { | |
for data := range in { | |
for _, word := range data { |
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
module github.com/JensRantil/topk-challenge | |
require ( | |
github.com/funkygao/golib v0.0.0-20180314131852-90d4905c1961 // indirect | |
github.com/google/pprof v0.0.0-20190502144155-8358a9778bd1 // indirect | |
github.com/hashicorp/go-multierror v1.0.0 | |
github.com/pkg/errors v0.8.1 | |
golang.org/x/arch v0.0.0-20190312162104-788fe5ffcd8c // indirect | |
golang.org/x/sync v0.0.0-20190423024810-112230192c58 | |
) |
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
module github.com/tink-ab/tink-backend/src/nats-streaming-pinger | |
require ( | |
github.com/armon/go-metrics v0.0.0-20190423201044-2801d9688273 // indirect | |
github.com/go-sql-driver/mysql v1.4.1 // indirect | |
github.com/gogo/protobuf v1.2.1 // indirect | |
github.com/hashicorp/go-msgpack v0.5.4 // indirect | |
github.com/hashicorp/raft v1.0.1 // indirect | |
github.com/lib/pq v1.1.0 // indirect | |
github.com/nats-io/gnatsd v1.4.1 // indirect |
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
module github.com/tink-ab/tink-backend/src/nats-checker | |
require ( | |
github.com/nats-io/gnatsd v1.4.1 // indirect | |
github.com/nats-io/go-nats v1.7.2 | |
github.com/nats-io/nkeys v0.0.2 // indirect | |
github.com/nats-io/nuid v1.0.1 // indirect | |
github.com/oklog/ulid v1.3.1 | |
github.com/prometheus/client_golang v0.9.2 | |
golang.org/x/sys v0.0.0-20190425045458-9f0b1ff7b46a // indirect |