Class OffsetOutOfRangeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.kafka.common.KafkaException
org.apache.kafka.clients.consumer.InvalidOffsetException
org.apache.kafka.clients.consumer.OffsetOutOfRangeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
LogTruncationException
No reset policy has been defined, and the offsets for these partitions are either larger or smaller
than the range of offsets the server has for the given partition.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOffsetOutOfRangeException(String message, Map<TopicPartition, Long> offsetOutOfRangePartitions) Constructs a new OffsetOutOfRangeException with a custom message.OffsetOutOfRangeException(Map<TopicPartition, Long> offsetOutOfRangePartitions) Constructs a new OffsetOutOfRangeException with the offsets that are out of range. -
Method Summary
Modifier and TypeMethodDescriptionGet a map of the topic partitions and the respective out-of-range fetch offsets.Returns the set of partitions for which the offset was invalid.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OffsetOutOfRangeException
Constructs a new OffsetOutOfRangeException with the offsets that are out of range.- Parameters:
offsetOutOfRangePartitions- Map of partition to the out-of-range offset
-
OffsetOutOfRangeException
public OffsetOutOfRangeException(String message, Map<TopicPartition, Long> offsetOutOfRangePartitions) Constructs a new OffsetOutOfRangeException with a custom message.- Parameters:
message- The detail messageoffsetOutOfRangePartitions- Map of partition to the out-of-range offset
-
-
Method Details
-
offsetOutOfRangePartitions
Get a map of the topic partitions and the respective out-of-range fetch offsets. -
partitions
Description copied from class:InvalidOffsetExceptionReturns the set of partitions for which the offset was invalid.- Specified by:
partitionsin classInvalidOffsetException- Returns:
- The set of partitions with invalid offsets
-