pub struct InMemoryTransport { /* private fields */ }Expand description
In-memory FragmentTransport: routes fragments to per-tablet executors,
records starts/cancellations/refills for test introspection, and keeps
each fragment’s ExecutionControl so cancellations are observable.
Implementations§
Source§impl InMemoryTransport
impl InMemoryTransport
Sourcepub fn new(default_executor: Arc<dyn FragmentExecutor>) -> Self
pub fn new(default_executor: Arc<dyn FragmentExecutor>) -> Self
A transport whose every fragment runs on default_executor.
Sourcepub fn with_executor(
self,
tablet: TabletId,
executor: Arc<dyn FragmentExecutor>,
) -> Self
pub fn with_executor( self, tablet: TabletId, executor: Arc<dyn FragmentExecutor>, ) -> Self
Pins one tablet to its own executor.
Sourcepub fn started_fragments(&self) -> Vec<FragmentId> ⓘ
pub fn started_fragments(&self) -> Vec<FragmentId> ⓘ
Fragments started so far, in start order.
Sourcepub fn cancelled_fragments(&self) -> Vec<FragmentId> ⓘ
pub fn cancelled_fragments(&self) -> Vec<FragmentId> ⓘ
Fragments cancelled so far, in cancel order.
Sourcepub fn refill_log(&self) -> Vec<(FragmentId, usize, usize)>
pub fn refill_log(&self) -> Vec<(FragmentId, usize, usize)>
Top-k refills issued so far: (fragment_id, offset, limit).
Sourcepub fn control_for(&self, fragment_id: FragmentId) -> Option<ExecutionControl>
pub fn control_for(&self, fragment_id: FragmentId) -> Option<ExecutionControl>
The control handed to a started fragment, for cancellation assertions.
Trait Implementations§
Source§impl FragmentTransport for InMemoryTransport
impl FragmentTransport for InMemoryTransport
Source§fn execute_fragment<'life0, 'life1, 'async_trait>(
&'life0 self,
fragment: &'life1 PlanFragment,
inputs: Vec<FragmentStream>,
control: FragmentControl,
) -> Pin<Box<dyn Future<Output = DistributedResult<FragmentStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_fragment<'life0, 'life1, 'async_trait>(
&'life0 self,
fragment: &'life1 PlanFragment,
inputs: Vec<FragmentStream>,
control: FragmentControl,
) -> Pin<Box<dyn Future<Output = DistributedResult<FragmentStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Starts a fragment on its assigned worker and returns its output
stream.
Source§fn cancel_fragment(&self, fragment_id: FragmentId) -> DistributedResult<()>
fn cancel_fragment(&self, fragment_id: FragmentId) -> DistributedResult<()>
Best-effort cancellation of a running (or abandoned) fragment.
Source§fn refill_top_k(
&self,
fragment: &PlanFragment,
offset: usize,
limit: usize,
) -> DistributedResult<TopKRefill>
fn refill_top_k( &self, fragment: &PlanFragment, offset: usize, limit: usize, ) -> DistributedResult<TopKRefill>
Fetches the next top-k batch of a fragment’s tablet (adaptive
refill). Transports without a refill binding leave the default.
Auto Trait Implementations§
impl !Freeze for InMemoryTransport
impl !RefUnwindSafe for InMemoryTransport
impl !UnwindSafe for InMemoryTransport
impl Send for InMemoryTransport
impl Sync for InMemoryTransport
impl Unpin for InMemoryTransport
impl UnsafeUnpin for InMemoryTransport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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