use of org.apache.kafka.common.message.OffsetForLeaderEpochRequestData in project kafka by apache.
the class FetcherTest method offsetForLeaderPartitionMap.
private Map<TopicPartition, OffsetForLeaderPartition> offsetForLeaderPartitionMap(OffsetForLeaderEpochRequestData data) {
Map<TopicPartition, OffsetForLeaderPartition> result = new HashMap<>();
data.topics().forEach(topic -> topic.partitions().forEach(partition -> result.put(new TopicPartition(topic.topic(), partition.partition()), partition)));
return result;
}
Aggregations