Struct dataflow::source::SourceReaderPersistence[][src]

struct SourceReaderPersistence {
    source_name: String,
    config: PersistentTimestampBindingsConfig<SourceTimestamp, AssignedTimestamp>,
}
Expand description

Util for restoring persisted timestamps and rendering persistence operators.

Fields

source_name: Stringconfig: PersistentTimestampBindingsConfig<SourceTimestamp, AssignedTimestamp>

Implementations

Creates a new SourceReaderPersistence from the given configuration. The configuration determines the persistent collection that will be used by restore and render_persistence_operators, respectively.

Restores timestamp bindings from the given StreamReadHandle by reading the differential timestamp updates and materializing/consolidating them into a Vec. This basically sums up the diff of the bindings and collects those bindings whose diff is 1.

This returns two Vecs. The first contains the valid bindings, the second one contains retractions for the bindings that are beyond the upper_seal_ts which must be applied/emitted before emitting any new bindings updates.

NOTE: Consolidated bindings with a diff other than 0 or 1 indicate a bug, and this method panics if that case happens.

Renders operators that persist the given ts_bindings_stream to the configured persistent collection.

This does not seal the persistent collection, calling code must ensure that this happens eventually.

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