chia7712 commented on code in PR #18034:
URL: https://github.com/apache/kafka/pull/18034#discussion_r1872062292
##########
clients/src/main/java/org/apache/kafka/clients/admin/MemberDescription.java:
##########
@@ -131,13 +158,33 @@ public Optional<MemberAssignment> targetAssignment() {
return targetAssignment;
}
+ /**
+ * The epoch of the group member.
+ */
+ public Optional<Integer> memberEpoch() {
+ return memberEpoch;
+ }
+
+ /**
+ * The flag indicating whether a member with a consumer group uses the
consumer protocol.
+ * True for consumer member.
+ * False for classic member
+ * Empty for unknown or classic member in classic group.
+ */
+ public Optional<Boolean> upgraded() {
+ return upgraded;
+ }
+
@Override
public String toString() {
return "(memberId=" + memberId +
", groupInstanceId=" + groupInstanceId.orElse("null") +
", clientId=" + clientId +
", host=" + host +
", assignment=" + assignment +
- ", targetAssignment=" + targetAssignment + ")";
+ ", targetAssignment=" + targetAssignment +
+ ", memberEpoch=" + memberEpoch.orElse(null) +
+ ", isClassic=" + upgraded.orElse(null) +
Review Comment:
`isClassic` -> `upgraded`
##########
clients/src/main/java/org/apache/kafka/clients/admin/MemberDescription.java:
##########
@@ -30,21 +30,26 @@ public class MemberDescription {
private final String host;
private final MemberAssignment assignment;
private final Optional<MemberAssignment> targetAssignment;
+ private final Optional<Integer> memberEpoch;
+ private final Optional<Boolean> isClassic;
public MemberDescription(String memberId,
Review Comment:
Have we considered deprecating the other constructors? It seems odd to have
so many constructors.
##########
clients/src/main/java/org/apache/kafka/clients/admin/ConsumerGroupDescription.java:
##########
@@ -108,7 +113,8 @@ public ConsumerGroupDescription(String groupId,
GroupState groupState,
Node coordinator,
Set<AclOperation> authorizedOperations) {
- this(groupId, isSimpleConsumerGroup, members, partitionAssignor,
GroupType.CLASSIC, groupState, coordinator, authorizedOperations);
+ this(groupId, isSimpleConsumerGroup, members, partitionAssignor,
GroupType.CLASSIC, groupState, coordinator, authorizedOperations,
+ Optional.empty(), Optional.empty());
}
public ConsumerGroupDescription(String groupId,
Review Comment:
We can remove the two constructors directly, as doing so does not result in
any compatibility issues.
--
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]