dajac commented on a change in pull request #11022:
URL: https://github.com/apache/kafka/pull/11022#discussion_r668853531
##########
File path:
clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandler.java
##########
@@ -151,38 +162,59 @@ public String apiName() {
completed.put(groupIdKey, consumerGroupDescription);
} else {
failed.put(groupIdKey, new IllegalArgumentException(
- String.format("GroupId %s is not a consumer group
(%s).",
- groupIdKey.idValue, protocolType)));
+ String.format("GroupId %s is not a consumer group (%s).",
+ groupIdKey.idValue, protocolType)));
}
}
- return new ApiResult<>(completed, failed, unmapped);
+
+ if (groupsToUnmap.isEmpty() && groupsToRetry.isEmpty()) {
Review comment:
It seems incorrect here as well.
##########
File path:
clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandler.java
##########
@@ -103,6 +104,12 @@ public String apiName() {
return new DescribeGroupsRequest.Builder(data);
}
+ private void validateGroupsNotEmpty(List<DescribedGroup> describedGroups) {
+ if (describedGroups.isEmpty()) {
+ throw new InvalidGroupIdException("No consumer group found");
+ }
+ }
Review comment:
What's the purpose of this check? I am not sure where this
`InvalidGroupIdException` thrown here will get to.
--
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]