AndrewJSchofield commented on code in PR #18834:
URL: https://github.com/apache/kafka/pull/18834#discussion_r1951124245
##########
clients/src/main/java/org/apache/kafka/common/requests/DescribeShareGroupOffsetsRequest.java:
##########
@@ -87,23 +101,10 @@ public static DescribeShareGroupOffsetsRequest
parse(ByteBuffer buffer, short ve
);
}
- public static
List<DescribeShareGroupOffsetsResponseData.DescribeShareGroupOffsetsResponseTopic>
getErrorDescribeShareGroupOffsets(
-
List<DescribeShareGroupOffsetsRequestData.DescribeShareGroupOffsetsRequestTopic>
topics,
- Errors error
- ) {
- return topics.stream()
- .map(
- requestTopic -> new
DescribeShareGroupOffsetsResponseData.DescribeShareGroupOffsetsResponseTopic()
- .setTopicName(requestTopic.topicName())
- .setPartitions(
- requestTopic.partitions().stream().map(
- partition -> new
DescribeShareGroupOffsetsResponseData.DescribeShareGroupOffsetsResponsePartition()
- .setPartitionIndex(partition)
- .setErrorCode(error.code())
- .setErrorMessage(error.message())
- .setStartOffset(0)
- ).collect(Collectors.toList())
- )
- ).collect(Collectors.toList());
+ public static DescribeShareGroupOffsetsResponseGroup
getErrorDescribedGroup(String groupId, Errors error) {
+ return new DescribeShareGroupOffsetsResponseGroup()
+ .setGroupId(groupId)
+ .setErrorCode(error.code())
+ .setErrorMessage(error.message());
Review Comment:
That is true, but the uses actually just return `COORDINATOR_NOT_AVAILABLE`.
I don't think it's an issue at this point. If we want to pass back specific
error messages, we can add that later.
--
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]