mirror of https://github.com/apache/kafka.git
KAFKA-19284 Add documentation to clarify the behavior of null values for all partitionsToOffsetAndMetadata methods. (#19728)
CI / build (push) Waiting to run
Details
CI / build (push) Waiting to run
Details
Adds missing documentation to the `partitionsToOffsetAndMetadata` methods in both `ListStreamsGroupOffsetsResult` and `ListShareGroupOffsetsResult` classes to clarify the behavior when a group does not have a committed offset for a specific partition. As document in ListConsumerGroupOffsetsResult: > If the group doesn’t have a committed offset for a specific partition, the corresponding value in the returned map will be null. This important detail was previously missing in the JavaDoc of the stream and share group variants. Reviewers: Nick Guo <lansg0504@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
f9df9b5652
commit
4eac6adf91
|
@ -66,10 +66,8 @@ public class ListShareGroupOffsetsResult {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return a future which yields a map of topic partitions to offsets for the specified group.
|
||||
*
|
||||
* @param groupId The group ID.
|
||||
* @return Future which yields a map of topic partitions to offsets for the specified group.
|
||||
* Return a future which yields a map of topic partitions to offsets for the specified group. If the group doesn't
|
||||
* have a committed offset for a specific partition, the corresponding value in the returned map will be null.
|
||||
*/
|
||||
public KafkaFuture<Map<TopicPartition, OffsetAndMetadata>> partitionsToOffsetAndMetadata(String groupId) {
|
||||
if (!futures.containsKey(groupId)) {
|
||||
|
|
|
@ -50,7 +50,8 @@ public class ListStreamsGroupOffsetsResult {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return a future which yields a map of topic partitions to offsets for the specified group.
|
||||
* Return a future which yields a map of topic partitions to offsets for the specified group. If the group doesn't
|
||||
* have a committed offset for a specific partition, the corresponding value in the returned map will be null.
|
||||
*/
|
||||
public KafkaFuture<Map<TopicPartition, OffsetAndMetadata>> partitionsToOffsetAndMetadata(String groupId) {
|
||||
return delegate.partitionsToOffsetAndMetadata(groupId);
|
||||
|
|
Loading…
Reference in New Issue