-
Notifications
You must be signed in to change notification settings - Fork 15.4k
KAFKA-16625: Reverse lookup map from topic partitions to members #15974
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
Merged
dajac
merged 60 commits into
apache:trunk
from
rreddy-22:KAFKA-16625_Reverse_Lookup_Map
May 25, 2024
Merged
Changes from 48 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
7d92a43
Add isSubscriptionHomogeneous value in ConsumerGroup
rreddy-22 f4ec728
Add isSubscriptionHomogeneous flag to TargetAssignmentBuilder
rreddy-22 0cb1a5f
Add isSubscriptionHomogeneous flag to AssignmentSpec
rreddy-22 1b7b693
Edit existing tests to incorporate changes
rreddy-22 e7c68b5
add getter method in AssignmentSpec
rreddy-22 11b7b1f
Modify UniformAssignor to use flag to decide which assignment builder…
rreddy-22 e710fca
Add optimization to the Range Assignor using flag
rreddy-22 b74f713
Change flag to TimelineObject in Consumer Group
rreddy-22 0785f3b
Incorporate updating subs model into update subs topic names method
rreddy-22 b7c2a24
minor
rreddy-22 db1c601
Revert to brute force check for subsModelUpdate
rreddy-22 2afb1bc
Convert group subscription model to enum from isSubscriptionHomogenen…
rreddy-22 50812d5
Enum added in a separate file
rreddy-22 9dada36
Add unit test
rreddy-22 d63e491
minor
rreddy-22 e3a8b95
Rename subsModel to subsType, PR comments
rreddy-22 9fa0ab3
Use enum in benchmarks
rreddy-22 5c4c4ed
move out subs updates into the group metadata manager
rreddy-22 0d25f3a
minor
rreddy-22 a4ce616
minor
rreddy-22 9cdd729
Address comments
rreddy-22 9ca54c3
minor
rreddy-22 a36d59c
address comments
rreddy-22 9d4fbfe
Initialize target assignment map in range assignor
rreddy-22 01a7b6e
Update numOfMembers in heartbeat
rreddy-22 d0a0ef9
Revert initialising new map in range assignor
rreddy-22 7e6a7eb
Merge remote-tracking branch 'upstream/trunk' into KAFKA-16587_Add_Su…
rreddy-22 ca53724
MINOR: Fix streams javadoc links (#15900)
AyoubOm fa9f388
MINOR: use classic consumer with ZK mode for DeleteOffsetsConsumerGro…
FrankYang0529 fa22563
MINOR: Add missing RPCs to security.html (#15878)
AndrewJSchofield 65b82ef
Add new group assignment interface and method to get if partition is …
rreddy-22 d2e7ef4
Integrate using the lookup map in the opt uniform assignor
rreddy-22 5a2d2a6
Integrate using the lookup map in the consumer group state
rreddy-22 729c1f3
Integrate using the lookup map in the consumer group state minor
rreddy-22 213dfe5
Update some test files and server benchmark and minor hacks - draft
rreddy-22 505b859
Use Map<Uuid,Map<Integer,String> to track partition assignments
rreddy-22 91d20b0
Update tests and benchmarks
rreddy-22 346e618
Minor + all unit tests pass for optimized uniform
rreddy-22 c8e0c34
Merge remote-tracking branch 'upstream/trunk' into KAFKA-16625_Revers…
rreddy-22 66fcd89
revert mistake
rreddy-22 867103e
minor
rreddy-22 55c76ec
Update assignor tests with partition assignments - all tests pass
rreddy-22 bc47eff
Rename assignmentSpec and groupAssignmentSpec
rreddy-22 5de869c
more renaming, minor
rreddy-22 3ac9c27
minor
rreddy-22 57a8db9
revert param changes in benchmarks
rreddy-22 86bf48b
minor
rreddy-22 4055e09
Address comments
rreddy-22 f7d0af7
Rename partitionAssignments to invertedTargetAssignments
rreddy-22 555b519
InheritDocs, comments
rreddy-22 449b168
minor
rreddy-22 2eadcb3
comments
rreddy-22 65a2866
comments
rreddy-22 a99fadc
comments
rreddy-22 3a27648
edit import problems
rreddy-22 09c11e5
Merge remote-tracking branch 'upstream/trunk' into KAFKA-16625_Revers…
rreddy-22 756983a
move add topic to assignor utils
rreddy-22 e00c5ed
minor
rreddy-22 5bf574e
minor
rreddy-22 dccb583
minor
rreddy-22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/assignor/GroupSpec.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.kafka.coordinator.group.assignor; | ||
|
|
||
| import org.apache.kafka.common.Uuid; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| /** | ||
| * The assignment specifications for a consumer group. | ||
| */ | ||
| public interface GroupSpec { | ||
| /** | ||
| * @return Member metadata keyed by member Id. | ||
| */ | ||
| Map<String, AssignmentMemberSpec> members(); | ||
|
|
||
| /** | ||
| * @return The group's subscription type. | ||
| */ | ||
| SubscriptionType subscriptionType(); | ||
|
|
||
| /** | ||
|
rreddy-22 marked this conversation as resolved.
|
||
| * @return True, if the partition is currently assigned to a member. | ||
| * False, otherwise. | ||
| */ | ||
| boolean isPartitionAssigned(Uuid topicId, int partitionId); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.