bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| # Calculate the latest and earliest offsets, and provide the total # of messages in the topic (the difference): | |
| #!/bin/bash | |
| if [[ $# -eq 0 ]] ; then | |
| echo 'provide the name of a topic to get totals against' | |
| exit 0 | |
| fi | |
| latest=`bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic $1 --time -1 --offsets 1 | awk -F ":" '{sum += $3} END {print sum}'` | |
| earliest=`bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic $1 --time -2 --offsets 1 | awk -F ":" '{sum2 += $3} END {print sum2}'` | |
| total=`expr $latest - $earliest` |
| -- Changing spotify notifications. | |
| naughty.config.presets.spotify = { | |
| -- if you want to disable Spotify notifications completely, return false | |
| callback = function(args) | |
| return true | |
| end, | |
| -- Adjust the size of the notification | |
| height = 100, | |
| width = 400, |