-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
group: reset all partitions if invoked with -partition -1 #48
Conversation
group.go
Outdated
if args.reset != "" && (args.topic == "" || args.partition == -23 || args.group == "") { | ||
failf("group, topic, partition are required to reset offsets") | ||
if args.reset != "" && (args.topic == "" || args.partition == fetchAllPartitions || args.group == "") { | ||
failf("group and topic are required to reset offsets. for all partitions, run with -partition -1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure about this help message.
thanks a lot @disq ! i'm not working much with multi-partitioned topics so wasn't sure what the use cases are around resetting the consumer groups for multiple partitions. so thanks for providing one!
|
Yes, I think implementing an The race is, since the |
Few more suggestions - maybe specify the partition ID in the offset resolve message in L192, and rename the |
@disq sorry, slow to respond at the moment - traveling.
|
I'll do the |
Haven't had the time to test it yet, I'll report back if there's something to fix. |
Tested, seems to work. |
cheers @disq ! |
I'm new to Kafka (long time Kinesis user) so take this PR with a grain of salt :)
I thought that maybe you wouldn't want an implicit match-all-partitions logic in a potentially destructive (well, write) operation, so came up with the "-1" magic number. Maybe the
-partition
param can be a string, then it would acceptall
for all partitions etc.