Struct dataflow::source::timestamp::TimestampProposer[][src]

pub struct TimestampProposer {
    bindings: HashMap<PartitionId, MzOffset>,
    timestamp: Timestamp,
    last_update_time: Instant,
    update_interval: u64,
    now: NowFn,
}
Expand description

This struct holds state for proposed timestamps and proposed bindings from offsets to timestamps.

Fields

bindings: HashMap<PartitionId, MzOffset>

Working set of proposed offsets to assign to a new timestamp.

timestamp: Timestamp

Current timestamp we are assigning new data to.

last_update_time: Instant

Last time we updated the timestamp.

update_interval: u64

Interval at which we are updating the timestamp.

now: NowFn

Implementations

Attempt to propose that (partition, offset) be bound to time, which means that all offsets < offset get bound to time for partition.

This proposal will be ignored if the time does not match the current time this proposer is operating at, and also if another reader has already proposed a binding for an offset greater than offset. The only exception here is if time is 0, which is accepted to bootstrap the timestamp proposal.

Attempt to mint the currently proposed timestamp bindings, and open up for proposals on a new timestamp.

This function needs to be called periodically in order for RT sources to make progress.

Returns the current upper frontier (timestamp at which all future updates will occur).

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more