lucasbru commented on code in PR #18911:
URL: https://github.com/apache/kafka/pull/18911#discussion_r1963792617
##########
tools/src/main/java/org/apache/kafka/tools/streams/StreamsGroupCommand.java:
##########
@@ -307,6 +336,43 @@ Map<TopicPartition, Long>
getOffsets(Collection<StreamsGroupMemberDescription> m
return lag;
}
+ Map<TopicPartition, OffsetsAndLag> getOffsets2(StreamsGroupDescription
description) throws ExecutionException, InterruptedException {
+ final Collection<StreamsGroupMemberDescription> members =
description.members();
+ Set<TopicPartition> allTp = new HashSet<>();
+ for (StreamsGroupMemberDescription memberDescription : members) {
+
allTp.addAll(getTopicPartitions(memberDescription.assignment().activeTasks(),
description));
+ }
+ // fetch latest and earliest offsets
+ Map<TopicPartition, OffsetSpec> earliest = new HashMap<>();
+ Map<TopicPartition, OffsetSpec> latest = new HashMap<>();
+
+ for (TopicPartition tp : allTp) {
+ earliest.put(tp, OffsetSpec.earliest());
+ latest.put(tp, OffsetSpec.latest());
+ }
+ Map<TopicPartition, ListOffsetsResult.ListOffsetsResultInfo>
earliestResult = adminClient.listOffsets(earliest).all().get();
+ Map<TopicPartition, ListOffsetsResult.ListOffsetsResultInfo>
latestResult = adminClient.listOffsets(latest).all().get();
+ Map<TopicPartition, OffsetAndMetadata> committedOffsets =
getCommittedOffsets(description.groupId());
+
+ Map<TopicPartition, OffsetsAndLag> output = new HashMap<>();
Review Comment:
Have you removed the leader epoch completely now? Sorry for the extra round
of reviews, but it would help if you proactively comment on changes like this.
We did have the leader-epoch before, and it should be returned by
`getCommittedOffsets`, why is it not included in the result anymore?
--
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]