rreddy-22 commented on code in PR #16068:
URL: https://github.com/apache/kafka/pull/16068#discussion_r1621207749
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/assignor/MemberSubscriptionSpecImpl.java:
##########
@@ -18,105 +18,63 @@
import org.apache.kafka.common.Uuid;
-import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
/**
- * The assignment specification for a consumer group member.
+ * Implementation of the {@link MemberSubscriptionSpec} interface.
*/
-public class AssignmentMemberSpec {
- /**
- * The instance ID if provided.
- */
- private final Optional<String> instanceId;
-
- /**
- * The rack ID if provided.
- */
+public class MemberSubscriptionSpecImpl implements MemberSubscriptionSpec {
private final Optional<String> rackId;
-
- /**
- * Topics Ids that the member is subscribed to.
- */
private final Set<Uuid> subscribedTopicIds;
/**
- * Partitions assigned keyed by topicId.
- */
- private final Map<Uuid, Set<Integer>> assignedPartitions;
-
- /**
- * @return The instance ID as an Optional.
+ * Constructs a new {@code MemberSubscriptionSpecImpl}.
+ *
+ * @param rackId The rack Id.
+ * @param subscribedTopicIds The set of subscribed topic Ids.
*/
- public Optional<String> instanceId() {
- return instanceId;
+ public MemberSubscriptionSpecImpl(
+ Optional<String> rackId,
+ Set<Uuid> subscribedTopicIds
+ ) {
+ Objects.requireNonNull(rackId);
+ Objects.requireNonNull(subscribedTopicIds);
+ this.rackId = rackId;
+ this.subscribedTopicIds = subscribedTopicIds;
Review Comment:
I was just following the format I saw in TargetAssignmentResult and a few
places, wasn't sure what to use
--
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]