Skip to content

Instantly share code, notes, and snippets.

@tombentley
tombentley / kafka-cheat-sheet.md
Created June 14, 2017 10:39 — forked from sahilsk/kafka-cheat-sheet.md
Apache Kafka Cheat Sheet

Kafka Cheat Sheet

Display Topic Information

$ kafka-topics.sh --describe --zookeeper localhost:2181 --topic beacon
Topic:beacon	PartitionCount:6	ReplicationFactor:1	Configs:
	Topic: beacon	Partition: 0	Leader: 1	Replicas: 1	Isr: 1
	Topic: beacon	Partition: 1	Leader: 1	Replicas: 1	Isr: 1
@Maqiushi
Maqiushi / postFile.lua
Created May 24, 2017 08:04
simple wrk benchmark for posting binary file
--Read the binary file, lua takes binary files with no difference to strings(all UNIX;https://www.lua.org/pil/21.2.2.html). But, use 'b' tag
local inp = assert(io.open("xxxx.xml.gz", "rb"))
local data = inp:read("*all")
--HTTP custom settings
--Remember to set the schema, host and port here otherwise it will use default.
wrk.scheme = "http"
wrk.host = "localhost"
wrk.port = 3000
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm