Skip to main content

RecordedUpdates

Struct RecordedUpdates 

Source
pub struct RecordedUpdates<U: ColumnarUpdate> {
    pub updates: Updates<U>,
    pub records: usize,
    pub consolidated: bool,
}
Expand description

A thin wrapper around Updates that tracks the pre-consolidation record count for timely’s exchange accounting. This wrapper is the stream container type; the TrieChunker strips it, passing bare UpdatesTyped into the merge batcher.

Fields§

§updates: Updates<U>

The trie of (key, val, time, diff) updates.

§records: usize

Number of records in updates before consolidation.

§consolidated: bool

Whether updates is known to be sorted and consolidated (no duplicate (key, val, time) triples, no zero diffs).

Trait Implementations§

Source§

impl<U: ColumnarUpdate> Accountable for RecordedUpdates<U>

Source§

fn record_count(&self) -> i64

The number of records Read more
Source§

fn is_empty(&self) -> bool

Determine if this contains any updates, corresponding to update_count() == 0. It is a correctness error for this to be anything other than self.record_count() == 0.
Source§

impl<U: ColumnarUpdate> Clone for RecordedUpdates<U>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<U: ColumnarUpdate> ContainerBytes for RecordedUpdates<U>

Source§

fn from_bytes(bytes: Bytes) -> Self

Wrap bytes as Self.
Source§

fn length_in_bytes(&self) -> usize

The number of bytes required to serialize the data.
Source§

fn into_bytes<W: Write>(&self, writer: &mut W)

Writes the binary representation into writer.
Source§

impl<U: ColumnarUpdate> Default for RecordedUpdates<U>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<U: Update, H: for<'a> FnMut(Ref<'a, U::Key>) -> u64> Distributor<RecordedUpdates<U>> for ValDistributor<U, H>

Source§

fn partition<T: Clone, P: Push<Message<T, RecordedUpdates<U>>>>( &mut self, container: &mut RecordedUpdates<U>, time: &T, pushers: &mut [P], )

Partition the contents of container at time into the pushers.
Source§

fn flush<T: Clone, P: Push<Message<T, RecordedUpdates<U>>>>( &mut self, _time: &T, _pushers: &mut [P], )

Flush any remaining contents into the pushers at time time.
Source§

fn relax(&mut self)

Optionally release resources, such as memory.
Source§

impl<K, V, T1, T2, R> Enter<T1, T2> for RecordedUpdates<(K, V, T1, R)>
where (K, V, T1, R): Update<Key = K, Val = V, Time = T1, Diff = R>, (K, V, T2, R): Update<Key = K, Val = V, Time = T2, Diff = R>, T1: Timestamp + Columnar + Default + Clone, T2: Refines<T1> + Columnar + Default + Clone, K: Columnar, V: Columnar, R: Columnar,

Source§

type InnerContainer = RecordedUpdates<(K, V, T2, R)>

The resulting container type.
Source§

fn enter(self) -> Self::InnerContainer

Update timestamps from T1 to T2.
Source§

impl<K, V, T1, T2, R> Leave<T1, T2> for RecordedUpdates<(K, V, T1, R)>
where (K, V, T1, R): Update<Key = K, Val = V, Time = T1, Diff = R>, (K, V, T2, R): Update<Key = K, Val = V, Time = T2, Diff = R>, T1: Refines<T2> + Columnar + Default + Clone, T2: Timestamp + Columnar + Default + Clone, K: Columnar, V: Columnar, R: Columnar,

Source§

type OuterContainer = RecordedUpdates<(K, V, T2, R)>

The resulting container type.
Source§

fn leave(self) -> Self::OuterContainer

Update timestamps from T1 to T2.
Source§

impl<U: Update<Diff: Abelian>> Negate for RecordedUpdates<U>

Source§

fn negate(self) -> Self

Negates Abelian differences of each update.
Source§

impl<T, U, H> ParallelizationContract<T, RecordedUpdates<U>> for ValPact<H>
where T: Timestamp, U: Update, H: for<'a> FnMut(Ref<'a, U::Key>) -> u64 + 'static,

Source§

type Pusher = Exchange<T, LogPusher<Box<dyn Push<Message<T, RecordedUpdates<U>>>>>, ValDistributor<U, H>>

Type implementing Push produced by this pact.
Source§

type Puller = LogPuller<Box<dyn Pull<Message<T, RecordedUpdates<U>>>>>

Type implementing Pull produced by this pact.
Source§

fn connect( self, worker: &Worker, identifier: usize, address: Rc<[usize]>, logging: Option<TimelyLogger>, ) -> (Self::Pusher, Self::Puller)

Allocates a matched pair of push and pull endpoints implementing the pact.
Source§

impl<'a, U: ColumnarUpdate> PushInto<&'a mut RecordedUpdates<U>> for TrieChunker<U>

Source§

fn push_into(&mut self, container: &'a mut RecordedUpdates<U>)

Push item into self.
Source§

impl<U: Update> ResultsIn<<<U as ColumnarUpdate>::Time as Timestamp>::Summary> for RecordedUpdates<U>

Source§

fn results_in(self, step: &<U::Time as Timestamp>::Summary) -> Self

Advance times in the container by step.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

Source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<C> Container for C
where C: Accountable + Default + 'static,