格式
topic:partitionId:offset
查询最小值
bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 127.0.0.1:9092 -topic alert2 --time -29092
alert2:0:
查询最大值
bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 127.0.0.1:9092 -topic alert2 --time -1
alert2:0:187785423
设置offset
bin/zookeeper-shell.sh 127.0.0.1:2181
set /consumers/{yourConsumerGroup}/offsets/{yourFancyTopic}/{partitionId} {newOffset}
阅读(1999) | 评论(0) | 转发(0) |