Skip to main content

StatelessSourceImpl

Trait StatelessSourceImpl 

Source
pub trait StatelessSourceImpl<V, T>: 'static {
    type Part: Distributable + MaybeKey + Hash + Eq;
    type SourcePartition: StatelessSourcePartition<V, T>;

    // Required methods
    fn list_parts(&self) -> Vec<Self::Part>;
    fn build_part(&mut self, part: &Self::Part) -> Self::SourcePartition;
}
Expand description

Implementation of a stateless stream source

Required Associated Types§

Source

type Part: Distributable + MaybeKey + Hash + Eq

A Part of a partition is a key by which any partition of the source is uniquely identified. It is perfectly valid for a source to only have a single part and in turn only a single partition, though this may not be very useful.

Source

type SourcePartition: StatelessSourcePartition<V, T>

A partition of this source. Each partition must be able to read unique values. Partitions may be moved to different workers, when the jobs worker set changes. Usually partitions will directly relate to some partitioning used by the external system providing the data.

Required Methods§

Source

fn list_parts(&self) -> Vec<Self::Part>

List all initial partitions for this source

Source

fn build_part(&mut self, part: &Self::Part) -> Self::SourcePartition

Build the partition for the given part

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<V> StatelessSourceImpl<V, usize> for SingleIteratorSource<V>
where V: Data,

Source§

type Part = NoKey

Source§

type SourcePartition = SingleIteratorPartition<V>