pub enum OffsetSpec {
Earliest,
Latest,
Timestamp(i64),
MaxTimestamp,
EarliestLocal,
LatestTiered,
}Expand description
Offset specification for AdminClient::list_offsets.
Variants§
Earliest
The earliest available offset in the partition (log start).
Latest
The end offset (high-watermark) of the partition.
Timestamp(i64)
The first offset whose timestamp is ≥ the given milliseconds since the Unix epoch.
MaxTimestamp
The offset of the record carrying the largest timestamp in the
partition (KIP-734, ListOffsets v7+).
Not the same as Latest when producers write out of
order — which they do whenever CreateTime timestamps come from
application clocks, or when a partition is fed by several producers.
This is the spec that answers “when was this partition last genuinely
written to”, which Latest cannot.
EarliestLocal
The earliest offset still held in the broker’s local storage
(KIP-405 tiered storage, ListOffsets v8+).
Everything between Earliest and this offset lives in
remote storage, where reads are typically orders of magnitude slower. A
consumer or backfill job about to scan from the log start can use the
gap to decide whether it is about to pull from object storage.
LatestTiered
The last offset that has been copied to remote storage
(KIP-1005, ListOffsets v9+).
The tiering frontier: everything at or below it survives local retention.
Trait Implementations§
Source§impl Clone for OffsetSpec
impl Clone for OffsetSpec
impl Copy for OffsetSpec
Source§impl Debug for OffsetSpec
impl Debug for OffsetSpec
impl Eq for OffsetSpec
Source§impl PartialEq for OffsetSpec
impl PartialEq for OffsetSpec
impl StructuralPartialEq for OffsetSpec
Auto Trait Implementations§
impl Freeze for OffsetSpec
impl RefUnwindSafe for OffsetSpec
impl Send for OffsetSpec
impl Sync for OffsetSpec
impl Unpin for OffsetSpec
impl UnsafeUnpin for OffsetSpec
impl UnwindSafe for OffsetSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more