dajac commented on code in PR #16068:
URL: https://github.com/apache/kafka/pull/16068#discussion_r1624721396


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/assignor/GroupSpecImpl.java:
##########
@@ -75,36 +75,61 @@ public SubscriptionType subscriptionType() {
      */
     @Override
     public boolean isPartitionAssigned(Uuid topicId, int partitionId) {
-        Map<Integer, String> partitionMap = 
invertedTargetAssignment.get(topicId);
+        Map<Integer, String> partitionMap = 
invertedMemberAssignment.get(topicId);
         if (partitionMap == null) {
             return false;
         }
         return partitionMap.containsKey(partitionId);
     }
 
+    /**
+     * {@inheritDoc}
+     * @throws IllegalStateException If the member Id is not found.
+     */
+    @Override
+    public MemberSubscriptionSpec memberSubscription(String memberId) {
+        MemberSubscriptionSpec memberSubscription = 
memberSubscriptions.get(memberId);
+        if (memberSubscription == null) {
+            throw new IllegalStateException("Member Id " + memberId + " not 
found.");

Review Comment:
   btw, it may be better to return `IllegalArgumentException`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to