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



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -994,30 +1023,29 @@ public void onSuccess(ClientResponse response, 
RequestFuture<ListOffsetResult> f
      *               value of each partition may be null only for v0. In v1 
and later the ListOffset API would not
      *               return a null timestamp (-1 is returned instead when 
necessary).
      */
-    private void handleListOffsetResponse(Map<TopicPartition, 
ListOffsetRequest.PartitionData> timestampsToSearch,
+    private void handleListOffsetResponse(Map<TopicPartition, 
ListOffsetPartition> timestampsToSearch,
                                           ListOffsetResponse 
listOffsetResponse,
                                           RequestFuture<ListOffsetResult> 
future) {
         Map<TopicPartition, ListOffsetData> fetchedOffsets = new HashMap<>();
         Set<TopicPartition> partitionsToRetry = new HashSet<>();
         Set<String> unauthorizedTopics = new HashSet<>();
 
-        for (Map.Entry<TopicPartition, ListOffsetRequest.PartitionData> entry 
: timestampsToSearch.entrySet()) {
+        Map<TopicPartition, ListOffsetPartitionResponse> partitionsData = 
byTopicPartitions(listOffsetResponse.responseData());

Review comment:
       I actually switched logic to loop on the response as you initially 
suggested




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