Function mz_persist_client::operators::shard_source::shard_source
source · pub fn shard_source<'g, K, V, T, D, F, DT, G, C>(
scope: &mut Child<'g, G, T>,
name: &str,
client: impl Fn() -> C,
shard_id: ShardId,
as_of: Option<Antichain<G::Timestamp>>,
snapshot_mode: SnapshotMode,
until: Antichain<G::Timestamp>,
desc_transformer: Option<DT>,
key_schema: Arc<K::Schema>,
val_schema: Arc<V::Schema>,
should_fetch_part: F,
listen_sleep: Option<impl Fn() -> RetryParameters + 'static>,
start_signal: impl Future<Output = ()> + 'static,
error_handler: impl FnOnce(String) -> Pin<Box<dyn Future<Output = ()>>> + 'static,
project: ProjectionPushdown,
) -> (Stream<Child<'g, G, T>, FetchedBlob<K, V, G::Timestamp, D>>, Vec<PressOnDropButton>)where
K: Debug + Codec,
V: Debug + Codec,
D: Semigroup + Codec64 + Send + Sync,
F: FnMut(&PartStats, AntichainRef<'_, G::Timestamp>) -> bool + 'static,
G: Scope,
G::Timestamp: Timestamp + Lattice + Codec64 + TotalOrder,
T: Refines<G::Timestamp>,
DT: FnOnce(Child<'g, G, T>, &Stream<Child<'g, G, T>, (usize, SerdeLeasedBatchPart)>, usize) -> (Stream<Child<'g, G, T>, (usize, SerdeLeasedBatchPart)>, Vec<PressOnDropButton>),
C: Future<Output = PersistClient> + Send + 'static,
Expand description
Creates a new source that reads from a persist shard, distributing the work of reading data to all timely workers.
All times emitted will have been advanced by the given as_of
frontier.
All updates at times greater or equal to until
will be suppressed.
The map_filter_project
argument, if supplied, may be partially applied,
and any un-applied part of the argument will be left behind in the argument.
The desc_transformer
interposes an operator in the stream before the
chosen data is fetched. This is currently used to provide flow control… see
usages for details.