kirktrue commented on code in PR #19393: URL: https://github.com/apache/kafka/pull/19393#discussion_r2049779243
########## clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java: ########## @@ -1634,7 +1635,8 @@ public Map<TopicPartition, Long> beginningOffsets(Collection<TopicPartition> par * @param partitions the partitions to get the earliest offsets * @param timeout The maximum amount of time to await retrieval of the beginning offsets * - * @return The earliest available offsets for the given partitions + * @return The earliest available offsets for the given partitions. If the offset for a specific partition cannot be + * found or the timeout is zero, the corresponding value will be {@code null} Review Comment: ```suggestion * @return The earliest available offsets for the given partitions. If the offset for a specific partition cannot be * found or the timeout is zero, its entry in the returned map will be {@code null} ``` ########## clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java: ########## @@ -1684,7 +1687,8 @@ public Map<TopicPartition, Long> endOffsets(Collection<TopicPartition> partition * @param partitions the partitions to get the end offsets. * @param timeout The maximum amount of time to await retrieval of the end offsets * - * @return The end offsets for the given partitions. + * @return The end offsets for the given partitions. If the offset for a specific partition cannot be found or the + * timeout is zero, the corresponding value will be {@code null} Review Comment: ```suggestion * @return The end offsets for the given partitions. If the offset for a specific partition cannot be found or the * timeout is zero, its entry in the returned map will be {@code null} ``` ########## clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java: ########## @@ -1613,7 +1613,8 @@ public Map<TopicPartition, OffsetAndTimestamp> offsetsForTimes(Map<TopicPartitio * @see #seekToBeginning(Collection) * * @param partitions the partitions to get the earliest offsets. - * @return The earliest available offsets for the given partitions + * @return The earliest available offsets for the given partitions. If the offset for a specific partition cannot be + * found or the timeout is zero, the corresponding value will be {@code null} Review Comment: What do you think of this? ```suggestion * @return The earliest available offsets for the given partitions. If the offset for a specific partition cannot be * found within the default timeout, its entry in the returned map will be {@code null} ``` ########## clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java: ########## @@ -1658,7 +1660,8 @@ public Map<TopicPartition, Long> beginningOffsets(Collection<TopicPartition> par * @see #seekToEnd(Collection) * * @param partitions the partitions to get the end offsets. - * @return The end offsets for the given partitions. + * @return The end offsets for the given partitions. If the offset for a specific partition cannot be found or the + * timeout is zero, the corresponding value will be {@code null} Review Comment: ```suggestion * @return The end offsets for the given partitions. If the offset for a specific partition cannot be found within the default * timeout, its entry in the returned map will be {@code null} ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org