Advertisement
josephxsxn

reset kafka offsets for partition for group

Jul 2nd, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.41 KB | None | 0 0
  1. ./kafka-consumer-groups.sh --bootstrap-server kafka-hk-02-public.streetside.io:9092 --reset-offsets --to-latest --group weibo_prod_transfer_comments01 --topic sina.firehose.comments.in --execute
  2.  
  3.  
  4. ./kafka-consumer-groups.sh --bootstrap-server kafkaprod01:9092 \
  5. --topic vk.likes:0 \
  6. --reset-offsets \
  7. --to-offset 621057649 \
  8. --execute \
  9. --group OPS-VK-FireHose-Prod-1
  10.  
  11.  
  12. ./kafka-consumer-groups.sh --bootstrap-server kafkaprod11.boardreader.com:9092 \
  13. --all-topics \
  14. --reset-offsets \
  15. --to-latest \
  16. --execute \
  17. --group OPS_PROD_NIFI_SINA02
  18.  
  19.  
  20. ###This command prints the old offsets out of zookeeper
  21. ##Notice it uses --zookeeper and not --bootstrap-server
  22. ##be warned this lists the offsets for ALL topics for this group and not just the topic we want.
  23. ./kafka-consumer-groups.sh --zookeeper localhost:2181 --group igortestdedup --describe
  24.  
  25. ##This command sets the offset for the new client used after Kafka 0.10.
  26. ## Notice the topic value is STRING:INTEGER  String being the topic name, integer being the partition we are changing.
  27. ## --to-offset is the offset we want to switch it to.
  28.  
  29.  ./kafka-consumer-groups.sh --bootstrap-server kafkaprod01:9092 --topic disqus.fullfeed.in:6 --reset-offsets --to-offset 29500147 --execute --group igortestdedup
  30.  
  31.  ./kafka-consumer-groups.sh --bootstrap-server kafkaprod12:9092 --topic sina.firehose.out:9 --reset-offsets --to-offset 1195984633 --execute --group sina-manticore-pq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement