diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/MemberDescription.java b/clients/src/main/java/org/apache/kafka/clients/admin/MemberDescription.java index e72a48d8a626c..b45abcdcd7ca2 100644 --- a/clients/src/main/java/org/apache/kafka/clients/admin/MemberDescription.java +++ b/clients/src/main/java/org/apache/kafka/clients/admin/MemberDescription.java @@ -28,6 +28,7 @@ public class MemberDescription { private final String memberId; private final Optional groupInstanceId; + private final Optional rackId; private final String clientId; private final String host; private final MemberAssignment assignment; @@ -38,6 +39,7 @@ public class MemberDescription { public MemberDescription( String memberId, Optional groupInstanceId, + Optional rackId, String clientId, String host, MemberAssignment assignment, @@ -47,6 +49,7 @@ public MemberDescription( ) { this.memberId = memberId == null ? "" : memberId; this.groupInstanceId = groupInstanceId; + this.rackId = rackId; this.clientId = clientId == null ? "" : clientId; this.host = host == null ? "" : host; this.assignment = assignment == null ? @@ -57,9 +60,36 @@ public MemberDescription( } /** - * @deprecated Since 4.0. Use {@link #MemberDescription(String, Optional, String, String, MemberAssignment, Optional, Optional, Optional)} instead. + * @deprecated Since 4.2. Use {@link #MemberDescription(String, Optional, Optional, String, String, MemberAssignment, Optional, Optional, Optional)} instead. */ - @Deprecated + @Deprecated(since = "4.2", forRemoval = true) + public MemberDescription( + String memberId, + Optional groupInstanceId, + String clientId, + String host, + MemberAssignment assignment, + Optional targetAssignment, + Optional memberEpoch, + Optional upgraded + ) { + this( + memberId, + groupInstanceId, + Optional.empty(), + clientId, + host, + assignment, + targetAssignment, + memberEpoch, + upgraded + ); + } + + /** + * @deprecated Since 4.0. Use {@link #MemberDescription(String, Optional, Optional, String, String, MemberAssignment, Optional, Optional, Optional)} instead. + */ + @Deprecated(since = "4.0", forRemoval = true) public MemberDescription( String memberId, Optional groupInstanceId, @@ -81,9 +111,9 @@ public MemberDescription( } /** - * @deprecated Since 4.0. Use {@link #MemberDescription(String, Optional, String, String, MemberAssignment, Optional, Optional, Optional)} instead. + * @deprecated Since 4.0. Use {@link #MemberDescription(String, Optional, Optional, String, String, MemberAssignment, Optional, Optional, Optional)} instead. */ - @Deprecated + @Deprecated(since = "4.0", forRemoval = true) public MemberDescription( String memberId, Optional groupInstanceId, @@ -102,9 +132,9 @@ public MemberDescription( } /** - * @deprecated Since 4.0. Use {@link #MemberDescription(String, Optional, String, String, MemberAssignment, Optional, Optional, Optional)} instead. + * @deprecated Since 4.0. Use {@link #MemberDescription(String, Optional, Optional, String, String, MemberAssignment, Optional, Optional, Optional)} instead. */ - @Deprecated + @Deprecated(since = "4.0", forRemoval = true) public MemberDescription(String memberId, String clientId, String host, @@ -119,6 +149,7 @@ public boolean equals(Object o) { MemberDescription that = (MemberDescription) o; return memberId.equals(that.memberId) && groupInstanceId.equals(that.groupInstanceId) && + rackId.equals(that.rackId) && clientId.equals(that.clientId) && host.equals(that.host) && assignment.equals(that.assignment) && @@ -129,7 +160,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(memberId, groupInstanceId, clientId, host, assignment, targetAssignment, memberEpoch, upgraded); + return Objects.hash(memberId, groupInstanceId, rackId, clientId, host, assignment, targetAssignment, memberEpoch, upgraded); } /** @@ -146,6 +177,17 @@ public Optional groupInstanceId() { return groupInstanceId; } + /** + * The rack id of the group member. + *

+ * It is only available for consumer groups using the new consumer group protocol + * ({@code group.protocol=consumer}). + *

+ */ + public Optional rackId() { + return rackId; + } + /** * The client id of the group member. */ @@ -197,6 +239,7 @@ public Optional upgraded() { public String toString() { return "(memberId=" + memberId + ", groupInstanceId=" + groupInstanceId.orElse("null") + + ", rackId=" + rackId.orElse("null") + ", clientId=" + clientId + ", host=" + host + ", assignment=" + assignment + diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/ShareMemberDescription.java b/clients/src/main/java/org/apache/kafka/clients/admin/ShareMemberDescription.java index 5fb74d8b24276..db9e41612d026 100644 --- a/clients/src/main/java/org/apache/kafka/clients/admin/ShareMemberDescription.java +++ b/clients/src/main/java/org/apache/kafka/clients/admin/ShareMemberDescription.java @@ -20,6 +20,7 @@ import java.util.Collections; import java.util.Objects; +import java.util.Optional; /** * A detailed description of a single share group member in the cluster. @@ -27,6 +28,7 @@ @InterfaceStability.Evolving public class ShareMemberDescription { private final String memberId; + private final Optional rackId; private final String clientId; private final String host; private final ShareMemberAssignment assignment; @@ -34,12 +36,14 @@ public class ShareMemberDescription { public ShareMemberDescription( String memberId, + Optional rackId, String clientId, String host, ShareMemberAssignment assignment, int memberEpoch ) { this.memberId = memberId == null ? "" : memberId; + this.rackId = rackId; this.clientId = clientId == null ? "" : clientId; this.host = host == null ? "" : host; this.assignment = assignment == null ? @@ -53,6 +57,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; ShareMemberDescription that = (ShareMemberDescription) o; return memberId.equals(that.memberId) && + rackId.equals(that.rackId) && clientId.equals(that.clientId) && host.equals(that.host) && assignment.equals(that.assignment) && @@ -61,7 +66,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(memberId, clientId, host, assignment, memberEpoch); + return Objects.hash(memberId, rackId, clientId, host, assignment, memberEpoch); } /** @@ -71,6 +76,13 @@ public String consumerId() { return memberId; } + /** + * The rack id of the group member. + */ + public Optional rackId() { + return rackId; + } + /** * The client id of the group member. */ @@ -102,6 +114,7 @@ public int memberEpoch() { @Override public String toString() { return "(memberId=" + memberId + + ", rackId=" + rackId.orElse("null") + ", clientId=" + clientId + ", host=" + host + ", assignment=" + assignment + diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeClassicGroupsHandler.java b/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeClassicGroupsHandler.java index 686ee43a44b2b..3ff4726661be2 100644 --- a/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeClassicGroupsHandler.java +++ b/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeClassicGroupsHandler.java @@ -134,6 +134,7 @@ public ApiResult handleResponse( memberDescriptions.add(new MemberDescription( groupMember.memberId(), Optional.ofNullable(groupMember.groupInstanceId()), + Optional.empty(), groupMember.clientId(), groupMember.clientHost(), new MemberAssignment(partitions), diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandler.java b/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandler.java index 6a04873c0b78e..9cb7f9deace15 100644 --- a/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandler.java +++ b/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandler.java @@ -219,6 +219,7 @@ private ApiResult handledConsumerGroup memberDescriptions.add(new MemberDescription( groupMember.memberId(), Optional.ofNullable(groupMember.instanceId()), + Optional.ofNullable(groupMember.rackId()), groupMember.clientId(), groupMember.clientHost(), new MemberAssignment(convertAssignment(groupMember.assignment())), @@ -283,6 +284,7 @@ private ApiResult handledClassicGroupR memberDescriptions.add(new MemberDescription( groupMember.memberId(), Optional.ofNullable(groupMember.groupInstanceId()), + Optional.empty(), groupMember.clientId(), groupMember.clientHost(), new MemberAssignment(partitions), diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeShareGroupsHandler.java b/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeShareGroupsHandler.java index 1f49a0d60580d..5ce8af38baad7 100644 --- a/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeShareGroupsHandler.java +++ b/clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeShareGroupsHandler.java @@ -41,6 +41,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; @@ -119,6 +120,7 @@ public ApiResult handleResponse( describedGroup.members().forEach(groupMember -> memberDescriptions.add(new ShareMemberDescription( groupMember.memberId(), + Optional.ofNullable(groupMember.rackId()), groupMember.clientId(), groupMember.clientHost(), new ShareMemberAssignment(convertAssignment(groupMember.assignment())), diff --git a/clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java b/clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java index 9084a25836efc..d01cde83bb312 100644 --- a/clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java +++ b/clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java @@ -4694,7 +4694,7 @@ public void testDescribeOldAndNewConsumerGroups() throws Exception { .setClientHost("host") .setClientId("clientId") .setMemberEpoch(10) - .setRackId("rackid") + .setRackId("rackId") .setSubscribedTopicNames(singletonList("foo")) .setSubscribedTopicRegex("regex") .setAssignment(new ConsumerGroupDescribeResponseData.Assignment() @@ -4758,6 +4758,7 @@ public void testDescribeOldAndNewConsumerGroups() throws Exception { new MemberDescription( "memberId", Optional.of("instanceId"), + Optional.of("rackId"), "clientId", "host", new MemberAssignment( @@ -4785,6 +4786,7 @@ public void testDescribeOldAndNewConsumerGroups() throws Exception { new MemberDescription( "0", Optional.empty(), + Optional.empty(), "clientId0", "clientHost", new MemberAssignment( @@ -10673,6 +10675,7 @@ private static MemberDescription convertToMemberDescriptions(DescribedGroupMembe MemberAssignment assignment) { return new MemberDescription(member.memberId(), Optional.ofNullable(member.groupInstanceId()), + Optional.empty(), member.clientId(), member.clientHost(), assignment, @@ -10684,6 +10687,7 @@ private static MemberDescription convertToMemberDescriptions(DescribedGroupMembe private static ShareMemberDescription convertToShareMemberDescriptions(ShareGroupDescribeResponseData.Member member, ShareMemberAssignment assignment) { return new ShareMemberDescription(member.memberId(), + Optional.ofNullable(member.rackId()), member.clientId(), member.clientHost(), assignment, diff --git a/clients/src/test/java/org/apache/kafka/clients/admin/MemberDescriptionTest.java b/clients/src/test/java/org/apache/kafka/clients/admin/MemberDescriptionTest.java index 7c3e928b3a636..8630dbf7f035d 100644 --- a/clients/src/test/java/org/apache/kafka/clients/admin/MemberDescriptionTest.java +++ b/clients/src/test/java/org/apache/kafka/clients/admin/MemberDescriptionTest.java @@ -30,6 +30,7 @@ public class MemberDescriptionTest { private static final String MEMBER_ID = "member_id"; private static final Optional INSTANCE_ID = Optional.of("instanceId"); + private static final Optional RACK_ID = Optional.of("rackId"); private static final String CLIENT_ID = "client_id"; private static final String HOST = "host"; private static final MemberAssignment ASSIGNMENT; @@ -39,6 +40,7 @@ public class MemberDescriptionTest { ASSIGNMENT = new MemberAssignment(Collections.singleton(new TopicPartition("topic", 1))); STATIC_MEMBER_DESCRIPTION = new MemberDescription(MEMBER_ID, INSTANCE_ID, + RACK_ID, CLIENT_ID, HOST, ASSIGNMENT, @@ -50,6 +52,7 @@ public class MemberDescriptionTest { @Test public void testEqualsWithoutGroupInstanceId() { MemberDescription dynamicMemberDescription = new MemberDescription(MEMBER_ID, + Optional.empty(), Optional.empty(), CLIENT_ID, HOST, @@ -59,6 +62,7 @@ public void testEqualsWithoutGroupInstanceId() { Optional.empty()); MemberDescription identityDescription = new MemberDescription(MEMBER_ID, + Optional.empty(), Optional.empty(), CLIENT_ID, HOST, @@ -83,6 +87,7 @@ public void testEqualsWithGroupInstanceId() { MemberDescription identityDescription = new MemberDescription(MEMBER_ID, INSTANCE_ID, + RACK_ID, CLIENT_ID, HOST, ASSIGNMENT, @@ -98,6 +103,7 @@ public void testEqualsWithGroupInstanceId() { public void testNonEqual() { MemberDescription newMemberDescription = new MemberDescription("new_member", INSTANCE_ID, + RACK_ID, CLIENT_ID, HOST, ASSIGNMENT, @@ -110,6 +116,7 @@ public void testNonEqual() { MemberDescription newInstanceDescription = new MemberDescription(MEMBER_ID, Optional.of("new_instance"), + RACK_ID, CLIENT_ID, HOST, ASSIGNMENT, @@ -122,6 +129,7 @@ public void testNonEqual() { MemberDescription newTargetAssignmentDescription = new MemberDescription(MEMBER_ID, INSTANCE_ID, + RACK_ID, CLIENT_ID, HOST, ASSIGNMENT, @@ -133,6 +141,7 @@ public void testNonEqual() { MemberDescription newMemberEpochDescription = new MemberDescription(MEMBER_ID, INSTANCE_ID, + RACK_ID, CLIENT_ID, HOST, ASSIGNMENT, @@ -144,6 +153,7 @@ public void testNonEqual() { MemberDescription newIsClassicDescription = new MemberDescription(MEMBER_ID, INSTANCE_ID, + RACK_ID, CLIENT_ID, HOST, ASSIGNMENT, diff --git a/clients/src/test/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandlerTest.java b/clients/src/test/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandlerTest.java index eb3e99dc62167..b91d2f954717f 100644 --- a/clients/src/test/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandlerTest.java +++ b/clients/src/test/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandlerTest.java @@ -158,6 +158,7 @@ public void testSuccessfulHandleConsumerGroupResponse() { new MemberDescription( "memberId", Optional.of("instanceId"), + Optional.of("rackId"), "clientId", "host", new MemberAssignment(Set.of( @@ -172,6 +173,7 @@ public void testSuccessfulHandleConsumerGroupResponse() { new MemberDescription( "memberId-classic", Optional.of("instanceId-classic"), + Optional.empty(), "clientId-classic", "host", new MemberAssignment(Set.of( @@ -215,7 +217,7 @@ public void testSuccessfulHandleConsumerGroupResponse() { .setClientHost("host") .setClientId("clientId") .setMemberEpoch(10) - .setRackId("rackid") + .setRackId("rackId") .setSubscribedTopicNames(singletonList("foo")) .setSubscribedTopicRegex("regex") .setAssignment(new ConsumerGroupDescribeResponseData.Assignment() @@ -239,7 +241,7 @@ public void testSuccessfulHandleConsumerGroupResponse() { .setClientHost("host") .setClientId("clientId-classic") .setMemberEpoch(9) - .setRackId("rackid") + .setRackId(null) .setSubscribedTopicNames(singletonList("bar")) .setSubscribedTopicRegex("regex") .setAssignment(new ConsumerGroupDescribeResponseData.Assignment() @@ -269,6 +271,7 @@ public void testSuccessfulHandleClassicGroupResponse() { Collection members = singletonList(new MemberDescription( "memberId", Optional.empty(), + Optional.empty(), "clientId", "host", new MemberAssignment(tps), diff --git a/tools/src/test/java/org/apache/kafka/tools/consumer/group/ConsumerGroupServiceTest.java b/tools/src/test/java/org/apache/kafka/tools/consumer/group/ConsumerGroupServiceTest.java index 236d1ce51cc6f..d25b610d66187 100644 --- a/tools/src/test/java/org/apache/kafka/tools/consumer/group/ConsumerGroupServiceTest.java +++ b/tools/src/test/java/org/apache/kafka/tools/consumer/group/ConsumerGroupServiceTest.java @@ -142,7 +142,7 @@ public void testAdminRequestsForDescribeNegativeOffsets() throws Exception { true, Set.of( new MemberDescription( - "member1", Optional.of("instance1"), "client1", "host1", new MemberAssignment(assignedTopicPartitions), + "member1", Optional.of("instance1"), Optional.of("rackId1"), "client1", "host1", new MemberAssignment(assignedTopicPartitions), Optional.empty(), Optional.empty(), Optional.empty() ) ), @@ -259,7 +259,7 @@ protected Admin createAdminClient(Map configOverrides) { @SuppressWarnings("deprecation") private DescribeConsumerGroupsResult describeGroupsResult(GroupState groupState) { MemberDescription member1 = new MemberDescription( - "member1", Optional.of("instance1"), "client1", "host1", null, + "member1", Optional.of("instance1"), Optional.of("rackId1"), "client1", "host1", null, Optional.empty(), Optional.empty(), Optional.empty()); ConsumerGroupDescription description = new ConsumerGroupDescription(GROUP, true, diff --git a/tools/src/test/java/org/apache/kafka/tools/consumer/group/ShareGroupCommandTest.java b/tools/src/test/java/org/apache/kafka/tools/consumer/group/ShareGroupCommandTest.java index 3b1843b95cd17..39595797f7885 100644 --- a/tools/src/test/java/org/apache/kafka/tools/consumer/group/ShareGroupCommandTest.java +++ b/tools/src/test/java/org/apache/kafka/tools/consumer/group/ShareGroupCommandTest.java @@ -197,7 +197,7 @@ public void testDescribeOffsetsOfExistingGroup() throws Exception { DescribeShareGroupsResult describeShareGroupsResult = mock(DescribeShareGroupsResult.class); ShareGroupDescription exp = new ShareGroupDescription( firstGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.of("rackId1"), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0)) ), 0)), GroupState.STABLE, @@ -245,7 +245,7 @@ public void testDescribeOffsetsOfExistingGroupWithNulls() throws Exception { DescribeShareGroupsResult describeShareGroupsResult = mock(DescribeShareGroupsResult.class); ShareGroupDescription exp = new ShareGroupDescription( firstGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.empty(), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0)) ), 0)), GroupState.STABLE, @@ -298,14 +298,14 @@ public void testDescribeOffsetsOfAllExistingGroups() throws Exception { DescribeShareGroupsResult describeShareGroupsResult = mock(DescribeShareGroupsResult.class); ShareGroupDescription exp1 = new ShareGroupDescription( firstGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.of("rackId1"), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0)) ), 0)), GroupState.STABLE, new Node(0, "host1", 9090), 0, 0); ShareGroupDescription exp2 = new ShareGroupDescription( secondGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.of("rackId1"), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0)) ), 0)), GroupState.STABLE, @@ -373,7 +373,7 @@ public void testDescribeStateOfExistingGroup() throws Exception { DescribeShareGroupsResult describeShareGroupsResult = mock(DescribeShareGroupsResult.class); ShareGroupDescription exp1 = new ShareGroupDescription( firstGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.of("rackId1"), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0)) ), 0)), GroupState.STABLE, @@ -419,14 +419,14 @@ public void testDescribeStatesOfAllExistingGroups() throws Exception { DescribeShareGroupsResult describeShareGroupsResult = mock(DescribeShareGroupsResult.class); ShareGroupDescription exp1 = new ShareGroupDescription( firstGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.of("rackId1"), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0)) ), 0)), GroupState.STABLE, new Node(0, "host1", 9090), 0, 0); ShareGroupDescription exp2 = new ShareGroupDescription( secondGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.of("rackId1"), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0)) ), 0)), GroupState.STABLE, @@ -474,7 +474,7 @@ public void testDescribeMembersOfExistingGroup() throws Exception { DescribeShareGroupsResult describeShareGroupsResult = mock(DescribeShareGroupsResult.class); ShareGroupDescription exp1 = new ShareGroupDescription( firstGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.of("rackId1"), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0), new TopicPartition("topic1", 1), new TopicPartition("topic2", 0)) ), 0)), GroupState.STABLE, @@ -520,14 +520,14 @@ public void testDescribeMembersOfAllExistingGroups() throws Exception { DescribeShareGroupsResult describeShareGroupsResult = mock(DescribeShareGroupsResult.class); ShareGroupDescription exp1 = new ShareGroupDescription( firstGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.of("rackId1"), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0), new TopicPartition("topic1", 1), new TopicPartition("topic2", 0)) ), 0)), GroupState.STABLE, new Node(0, "host1", 9090), 0, 0); ShareGroupDescription exp2 = new ShareGroupDescription( secondGroup, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.of("rackId1"), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic1", 0)) ), 0)), GroupState.STABLE, @@ -1334,7 +1334,7 @@ public void testAlterShareGroupOffsetsFailureWithNoneEmptyGroup() { ShareGroupDescription exp = new ShareGroupDescription( group, - List.of(new ShareMemberDescription("memid1", "clId1", "host1", new ShareMemberAssignment( + List.of(new ShareMemberDescription("memid1", Optional.empty(), "clId1", "host1", new ShareMemberAssignment( Set.of(new TopicPartition("topic", 0)) ), 0)), GroupState.STABLE,