mimaison commented on a change in pull request #8295:
URL: https://github.com/apache/kafka/pull/8295#discussion_r452324069



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -965,11 +994,11 @@ public void onFailure(RuntimeException e) {
      * @return A response which can be polled to obtain the corresponding 
timestamps and offsets.
      */
     private RequestFuture<ListOffsetResult> sendListOffsetRequest(final Node 
node,
-                                                                  final 
Map<TopicPartition, ListOffsetRequest.PartitionData> timestampsToSearch,
+                                                                  final 
Map<TopicPartition, ListOffsetPartition> timestampsToSearch,
                                                                   boolean 
requireTimestamp) {
         ListOffsetRequest.Builder builder = ListOffsetRequest.Builder
                 .forConsumer(requireTimestamp, isolationLevel)
-                .setTargetTimes(timestampsToSearch);
+                .setTargetTimes(toListOffsetTopics(timestampsToSearch));

Review comment:
       I initially tried to do that but there's a couple of intermediate 
collections using `TopicPartition` in these methods and it makes it really hard 
to update them. For example:
   - 
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java#L735
   - 
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java#L880
   - 
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java#L887
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to