KAFKA-7471: Multiple Consumer Group Management Feature#5726
Conversation
…x_map_count bullet point
…x_map_count bullet point
…e) + --groups-all option Functionality: * Describe/Delete/Reset offsets on multiple consumer groups at a time (including each group by repeating `--group` parameter) * Describe/Delete/Reset offsets on ALL consumer groups at a time (add new `--groups-all` option similar to `--topics-all`) * Export offsets to reset for multiple consumer groups to a CSV file (CSV generation export/import rework, CSV format rework)
…of github.com:rootex-/kafka into KAFKA-7471_Multiple_Consumer_Group_Management_Feature
|
@rootex- Thanks a lot for the contribution. I think this is a great idea. There are a few comments/suggestions in the KIP discussion thread. Can you have a look and let us know what you think? |
@hachikuji Hi Jason, thanks for messaging here. Missed the discussion thread without any email notifications. I'll check them out and leave my reply as soon as I can. |
|
@Rootex @hachikuji Can all consumer groups functionality extended to admin client ? i.e change listConsumeGroupOffsets to allow take multiple group ids and return all consumer group offsets or have listAllConsumerGroupOffsets method. |
|
@saagar2000 Yeah, that's a good question It is a little curious that we made |
* Single group CSV format: "topic,partition,offset" * Multiple group CSV format: "group,topic,partition,offset"
|
Please review the latest updates, according to [DISCUSS]: KIP-379: Multiple Consumer Group Management |
https://github.com/rootex-/kafka into KAFKA-7471_Multiple_Consumer_Group_Management_Feature
vahidhashemian
left a comment
There was a problem hiding this comment.
@rootex- Thank you for submitting the PR. I left a few initial comments.
BTW, the KIP has enough binding votes for approval.
Thanks, you're right once again. Previously, that preceding
Done, thanks! Check out, please
I'll be back to this in a while |
vahidhashemian
left a comment
There was a problem hiding this comment.
Thanks for addressing my earlier comments. I left a comment inline, regarding one of those comments.
|
Looks like there are build failures. |
|
@vahidhashemian Yes, there were lots of conflicts and tricky merge. Looks like this branch is too far away from the original trunk version causing troubles. I'll take time to take a closer look. |
* Single group CSV format: "topic,partition,offset" * Multiple group CSV format: "group,topic,partition,offset"
a15861b to
9bb66ff
Compare
Back to work. Fixed now 👌 What's going on with |
|
@vahidhashemian any further comments maybe? |
|
@vahidhashemian @hachikuji any further notes or corrections maybe? It's ready to be merged I believe 👌 |
|
@vahidhashemian @hachikuji guys? |
|
I'm on vacation right now. Will try to take a look within the next week or so. |
vahidhashemian
left a comment
There was a problem hiding this comment.
Thanks for updating the PR and sorry for the delay in my review. I think it's close now. Left a few minor comments inline.
| // Make sure we got a coordinator | ||
| TestUtils.waitUntilTrue(() => { | ||
| consumerGroupCommand.collectGroupState().coordinator.host() == "localhost" | ||
| }, "Can't find a coordinator |
There was a problem hiding this comment.
Was there a coordinator lookup issue that warranted this block? I couldn't get this test to fail without it.
There was a problem hiding this comment.
Do not have any idea really, this code appeared after merge from trunk
There was a problem hiding this comment.
Looks like the code has been committed by Gwen Shapira here to fix a test:
KAFKA-7937: Fix Flaky Test ResetConsumerGroupOffsetTest.testResetOffsetsNotExistingGroup (#6311)
There was a problem hiding this comment.
@vahidhashemian is it ok if we leave it as is?
There was a problem hiding this comment.
@vahidhashemian one more thing: I'm unable to compile my branch anymore after merging with trunk due to a bunch of missing classes in imports section of org.apache.kafka.common.protocol.ApiKeys.java class like:
import org.apache.kafka.common.message.CreateTopicsRequestData;
import org.apache.kafka.common.message.CreateTopicsResponseData;
import org.apache.kafka.common.message.DescribeGroupsRequestData;
import org.apache.kafka.common.message.DescribeGroupsResponseData;
import org.apache.kafka.common.message.ElectPreferredLeadersRequestData;
import org.apache.kafka.common.message.ElectPreferredLeadersResponseData;
import org.apache.kafka.common.message.LeaveGroupRequestData;
import org.apache.kafka.common.message.LeaveGroupResponseData;
import org.apache.kafka.common.message.MetadataRequestData;
import org.apache.kafka.common.message.MetadataResponseData;
import org.apache.kafka.common.message.SaslAuthenticateRequestData;
import org.apache.kafka.common.message.SaslAuthenticateResponseData;
import org.apache.kafka.common.message.SaslHandshakeRequestData;
import org.apache.kafka.common.message.SaslHandshakeResponseData;
Those files are missing in the project.
And I'm also unable to compile trunk as well for the same reason.
Could we fix that?
There was a problem hiding this comment.
Regarding the added block of code I though you added it since it appeared in the commit diff. I now remember Gwen adding that block, so all is good. Sorry for the confusion.
I think I also noticed the compile issues you are referring to. Will have to dig further to determine the root cause.
Otherwise, things look good to me. Thanks for removing the unused imports.
There was a problem hiding this comment.
@vahidhashemian thanks for your accurate reviews, Vahid 👍 very straightforward and to the point
|
@hachikuji @vahidhashemian according to Vahid, PR is ready to be merged. All improvements have been applied. Can't wait to start using it out-of-the-box 😄 Jason, your final word? |
vahidhashemian
left a comment
There was a problem hiding this comment.
@hachikuji Did you also want to take a look at this PR before merging it?
|
@vahidhashemian I did a high level pass and it seems reasonable. If you're happy with it, I'd suggest merging. |
| compile project(':clients') | ||
| compile libs.jacksonDatabind | ||
| compile libs.jacksonModuleScala | ||
| compile libs.jacksonDataformatCsv |
There was a problem hiding this comment.
@vahidhashemian I don't think we should have this dependency. We have avoided the Jackson module for Scala on purpose as it doesn't provide enough value. It would be good to fix this before 2.3.0 if at all possible. cc @hachikuji
There was a problem hiding this comment.
To clarify, I'm referring to the Scala module (I got the line slightly wrong). The CSV one is probably fine.
There was a problem hiding this comment.
How this was isolated:
- comment out libs.jacksonModuleScala dependency in build.gradle
- execute ./gradlew -PscalaVersion=2.12 jar
Result: two compile errors in kafka.admin.ConsumerGroupCommand (core module)
I volunteer to help with this.
There was a problem hiding this comment.
@ijuma Thanks for catching this. I wasn't aware of the limitation.
@dejan2609 Thanks for volunteering. If you like, you can open a JIRA for easier tracking of the issue.
There was a problem hiding this comment.
@vahidhashemian Sure, I will open JIRA ticket.
@ijuma FYI: as a former Java developer that switched to build/release engineering I can't deliver quickly (but I assume this is not a post-haste).
There was a problem hiding this comment.
JIRA ticket is created here: https://issues.apache.org/jira/browse/KAFKA-8466 Remove 'jackson-module-scala' dependency (and replace it with some code)
* Describe/Delete/Reset offsets on multiple consumer groups at a time (including each group by repeating `--group` parameter) * Describe/Delete/Reset offsets on ALL consumer groups at a time (add new `--all-groups` option similar to `--all-topics`) * Reset plan CSV file generation reworked: structure updated to support multiple consumer groups and make sure that CSV file generation is done properly since there are no restrictions on consumer group names and symbols like commas and quotes are allowed. * Extending data output table format by adding `GROUP` column for all `--describe` queries
FEATURE
KAFKA-7471 Multiple Consumer Group Management (Describe, Reset, Delete) + --groups-all option
KIP-379: Multiple Consumer Group Management
[DISCUSS]: KIP-379: Multiple Consumer Group Management
Description:
--groupparameter)--all-groupsoption similar to--all-topics)All Unit and integration tests implemented.
Committer Checklist (excluded from commit message)