-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add getEndOffsets() to KafkaTestUtils #1666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
**cherry-pick to 2.6.x**
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chances to document this new API of testing utils?
Or we just point to its JavaDocs from the reference?
Thanks
.collect(Collectors.toList()); | ||
} | ||
else { | ||
Assert.noNullElements(partitions, "'partitions' cannot have nulll elements"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo:
Assert.noNullElements(partitions, "'partitions' cannot have nulll elements"); | |
Assert.noNullElements(partitions, "'partitions' cannot have null elements"); |
* @param topic the topic. | ||
* @param partitions the partitions, or null for all partitions. | ||
* @return the map of end offsets. | ||
* @since 2.6.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to add a @see
for JavaDocs of that consumer.endOffsets()
because that is exactly an info we get back.
* @return the map of end offsets. | ||
* @since 2.6.5 | ||
*/ | ||
public static <K, V> Map<TopicPartition, Long> getEndOffsets(Consumer<K, V> consumer, String topic, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these generic arguments don't give any value or benefits.
Probably Consumer<?, ?>
is what would work for end-users. Even if we need to do some casting internally, it is not going to affect target applications.
... and cherry-picked to |
cherry-pick to 2.6.x