Skip to content
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

KAFKA-17047: Refactored group coordinator classes to modern package (KIP-932) #16474

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

apoorvmittal10
Copy link
Contributor

Following the discussion and suggestion by @dajac, #16054 (comment), the PR refactors the common classes to build TargetAssignment in modern package. consumer package has been moved inside modern package with classes exclusive to consumer group.

This PR completes the refactoring and base to introduce share package inside modern. The subsequent PRs will define the implementation specific to Share Groups while re-using the common functionality from modern package classes.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Copy link
Contributor

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is largely a mechanical change. The revised packages make sense to me.

@apoorvmittal10
Copy link
Contributor Author

Build passed with no new tests failure, only existing non-related tests failure.

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apoorvmittal10 nice refactor and that is more clear.

@@ -28,7 +28,7 @@
import java.util.Objects;

/**
* The assignment specification for a consumer group.
* The assignment specification for a modern group.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure whether this is necessary change. Maybe we should align the term: "next gen", "modern", or "CONSUMER".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review @chia7712. I have aligned the changes to have the common functionality as modern. As this spec class will be used in target assignment which will be also utilized by upcoming share groups. Please let me know if there is correction needed elsewhere as well.

Copy link
Contributor

@chia7712 chia7712 Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for raising one more question

As this spec class will be used in target assignment which will be also utilized by upcoming share groups

it seems those share/consumer groups are on top of the new protocol, and the root package of those classes is called "modern". Hence, should we rename the value of group.coordinator.rebalance.protocols from CONSUMER to MODERN?

https://github.com/apache/kafka/blob/trunk/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/Group.java#L36

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we shall change the group.coordinator.rebalance.protocols itself. There shall remain 2 for those as classic and consumer. Package modern is more to share the common target assignment code between consumer and share groups. Share groups will be be specifically used for a consumption pattern where partitions get shared between clients to facilitate co-operative consumption.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I raise the "naming" issue, because it is hard to distinguish the term of "consumer protocol" and "consumer instance" in introducing the "AsyncConsumer" and "CONSUMER protocol" to users. I normally give up the term used by source code and then using term "next generation" be the replacement :_

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@apoorvmittal10
Copy link
Contributor Author

@dajac @chia7712 Build passed with unrelated tests failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants