Skip to main content

MergeBatcher

Struct MergeBatcher 

Source
pub struct MergeBatcher<Chu, M: Extractor, S> { /* private fields */ }
Expand description

Creates batches from chunks of sorted, consolidated tuples.

Chunking input is Chu’s business, merging chunks is M’s, and sealing the extracted chain into a batch is S’s; the batcher’s own work is the carve-by-frontier over its MergeLadder.

Implementations§

Source§

impl<Chu: Default, M: Extractor, S> MergeBatcher<Chu, M, S>

Source

pub fn new(logger: Option<Logger>, operator_id: usize) -> Self

Allocates a new empty batcher.

The logger and operator identifier are used to report the batcher’s memory footprint, attributed to the operator that owns it.

Trait Implementations§

Source§

impl<C, Chu, M, S> Batcher<C> for MergeBatcher<Chu, M, S>
where M: Extractor<Time: Timestamp>, Chu: ContainerBuilder<Container = M::Chunk> + for<'a> PushInto<&'a mut C>, S: Sealer<M::Chunk>,

Source§

fn insert(&mut self, container: &mut C)

Takes the updates in container, leaving it in an undefined state. Read more
Source§

impl<Chu, M, S> Extract for MergeBatcher<Chu, M, S>
where M: Extractor<Time: Timestamp>, Chu: ContainerBuilder<Container = M::Chunk>, S: Sealer<M::Chunk>,

Source§

type Time = <M as Extractor>::Time

The timestamps by which updates are carved out.
Source§

type Output = <S as Sealer<<M as Merger>::Chunk>>::Output

The batches released by extraction.
Source§

fn extract<'a>( &'a mut self, upper: AntichainRef<'_, M::Time>, ) -> (Option<S::Output>, AntichainRef<'a, M::Time>)

Extracts the updates upper unblocks as a batch, and lower bounds the times of those retained. Read more

Auto Trait Implementations§

§

impl<Chu, M, S> !RefUnwindSafe for MergeBatcher<Chu, M, S>

§

impl<Chu, M, S> !Send for MergeBatcher<Chu, M, S>

§

impl<Chu, M, S> !Sync for MergeBatcher<Chu, M, S>

§

impl<Chu, M, S> !UnwindSafe for MergeBatcher<Chu, M, S>

§

impl<Chu, M, S> Freeze for MergeBatcher<Chu, M, S>

§

impl<Chu, M, S> Unpin for MergeBatcher<Chu, M, S>

§

impl<Chu, M, S> UnsafeUnpin for MergeBatcher<Chu, M, S>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.