MINOR: Fix KafkaConsumer.commitSync() javadoc @throws declarations

Throws IllegalArgumentException is the offset is negative

Author: Mickael Maison <mickael.maison@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jason Gustafson <jason@confluent.io>

Closes #3780 from mimaison/commitSync_javadoc
This commit is contained in:
Mickael Maison 2017-09-18 12:58:03 -07:00 committed by Jason Gustafson
parent ae3eeb3e1c
commit 4ac7c48e91
1 changed files with 3 additions and 2 deletions

View File

@ -1168,7 +1168,7 @@ public class KafkaConsumer<K, V> implements Consumer<K, V> {
* @throws org.apache.kafka.common.errors.AuthorizationException if not authorized to the topic or to the
* configured groupId
* @throws org.apache.kafka.common.KafkaException for any other unrecoverable errors (e.g. if offset metadata
* is too large or if the committed offset is invalid).
* is too large or if the topic does not exist).
*/
@Override
public void commitSync() {
@ -1204,8 +1204,9 @@ public class KafkaConsumer<K, V> implements Consumer<K, V> {
* this function is called
* @throws org.apache.kafka.common.errors.AuthorizationException if not authorized to the topic or to the
* configured groupId
* @throws java.lang.IllegalArgumentException if the committed offset is negative
* @throws org.apache.kafka.common.KafkaException for any other unrecoverable errors (e.g. if offset metadata
* is too large or if the committed offset is invalid).
* is too large or if the topic does not exist).
*/
@Override
public void commitSync(final Map<TopicPartition, OffsetAndMetadata> offsets) {