Struct timely::dataflow::scopes::child::Child

source ·
pub struct Child<'a, G, T>{
    pub subgraph: &'a RefCell<SubgraphBuilder<G::Timestamp, T>>,
    pub parent: G,
    pub logging: Option<TimelyLogger>,
    pub progress_logging: Option<TimelyProgressLogger>,
}
Expand description

A Child wraps a Subgraph and a parent G: Scope. It manages the addition of Operates to a subgraph, and the connection of edges between them.

Fields§

§subgraph: &'a RefCell<SubgraphBuilder<G::Timestamp, T>>

The subgraph under assembly.

§parent: G

A copy of the child’s parent scope.

§logging: Option<TimelyLogger>

The log writer for this scope.

§progress_logging: Option<TimelyProgressLogger>

The progress log writer for this scope.

Implementations§

source§

impl<'a, G, T> Child<'a, G, T>

source

pub fn index(&self) -> usize

This worker’s unique identifier.

Ranges from 0 to self.peers() - 1.

source

pub fn peers(&self) -> usize

The total number of workers in the computation.

Trait Implementations§

source§

impl<'a, G, T> AsWorker for Child<'a, G, T>

source§

fn config(&self) -> &Config

Returns the worker configuration parameters.
source§

fn index(&self) -> usize

Index of the worker among its peers.
source§

fn peers(&self) -> usize

Number of peer workers.
source§

fn allocate<D: Data>( &mut self, identifier: usize, address: &[usize] ) -> (Vec<Box<dyn Push<Message<D>>>>, Box<dyn Pull<Message<D>>>)

Allocates a new channel from a supplied identifier and address. Read more
source§

fn pipeline<D: 'static>( &mut self, identifier: usize, address: &[usize] ) -> (ThreadPusher<Message<D>>, ThreadPuller<Message<D>>)

Constructs a pipeline channel from the worker to itself. Read more
source§

fn new_identifier(&mut self) -> usize

Allocates a new worker-unique identifier.
source§

fn log_register(&self) -> RefMut<'_, Registry<WorkerIdentifier>>

Provides access to named logging streams.
source§

fn logging(&self) -> Option<TimelyLogger>

Provides access to the timely logging stream.
source§

impl<'a, G, T> Clone for Child<'a, G, T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<'a, G, T> Scheduler for Child<'a, G, T>

source§

fn activations(&self) -> Rc<RefCell<Activations>>

Provides a shared handle to the activation scheduler.
source§

fn activator_for(&self, path: &[usize]) -> Activator

Constructs an Activator tied to the specified operator address.
source§

fn sync_activator_for(&self, path: &[usize]) -> SyncActivator

Constructs a SyncActivator tied to the specified operator address.
source§

impl<'a, G, T> Scope for Child<'a, G, T>

source§

fn name(&self) -> String

A useful name describing the scope.
source§

fn addr(&self) -> Vec<usize>

A sequence of scope identifiers describing the path from the worker root to this scope.
source§

fn add_edge(&self, source: Source, target: Target)

Connects a source of data with a target of the data. This only links the two for the purposes of tracking progress, rather than effect any data movement itself.
source§

fn add_operator_with_indices( &mut self, operator: Box<dyn Operate<Self::Timestamp>>, local: usize, global: usize )

Adds a child Operate to the builder’s scope using supplied indices. Read more
source§

fn allocate_operator_index(&mut self) -> usize

Allocates a new scope-local operator index. Read more
source§

fn scoped<T2, R, F>(&mut self, name: &str, func: F) -> R
where T2: Timestamp + Refines<T>, F: FnOnce(&mut Child<'_, Self, T2>) -> R,

Creates a dataflow subgraph. Read more
source§

fn add_operator(&mut self, operator: Box<dyn Operate<Self::Timestamp>>) -> usize

Adds a child Operate to the builder’s scope. Returns the new child’s index.
source§

fn add_operator_with_index( &mut self, operator: Box<dyn Operate<Self::Timestamp>>, index: usize )

Adds a child Operate to the builder’s scope using a supplied index. Read more
source§

fn iterative<T, R, F>(&mut self, func: F) -> R
where T: Timestamp, F: FnOnce(&mut Child<'_, Self, Product<<Self as ScopeParent>::Timestamp, T>>) -> R,

Creates a iterative dataflow subgraph. Read more
source§

fn region<R, F>(&mut self, func: F) -> R
where F: FnOnce(&mut Child<'_, Self, <Self as ScopeParent>::Timestamp>) -> R,

Creates a dataflow region with the same timestamp. Read more
source§

fn region_named<R, F>(&mut self, name: &str, func: F) -> R
where F: FnOnce(&mut Child<'_, Self, <Self as ScopeParent>::Timestamp>) -> R,

Creates a dataflow region with the same timestamp. Read more
source§

impl<'a, G, T> ScopeParent for Child<'a, G, T>

§

type Timestamp = T

The timestamp associated with data in this scope.

Auto Trait Implementations§

§

impl<'a, G, T> !RefUnwindSafe for Child<'a, G, T>

§

impl<'a, G, T> !Send for Child<'a, G, T>

§

impl<'a, G, T> !Sync for Child<'a, G, T>

§

impl<'a, G, T> Unpin for Child<'a, G, T>
where G: Unpin,

§

impl<'a, G, T> !UnwindSafe for Child<'a, G, T>

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<G, C> Concatenate<G, C> for G
where G: Scope, C: Container,

source§

fn concatenate<I>(&self, sources: I) -> StreamCore<G, C>
where I: IntoIterator<Item = StreamCore<G, C>>,

Merge the contents of multiple streams. Read more
source§

impl<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
where R: Region<Index = (usize, usize)>, O: OffsetContainer<usize>, T: CopyOnto<R>,

source§

fn copy_onto( self, target: &mut ConsecutiveOffsetPairs<R, O> ) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index

Copy self into the target container, returning an index that allows to look up the corresponding read item.
source§

impl<G> Feedback<G> for G
where G: Scope,

source§

fn feedback<C>( &mut self, summary: <<G as ScopeParent>::Timestamp as Timestamp>::Summary ) -> (Handle<G, C>, StreamCore<G, C>)
where C: Container,

Creates a StreamCore and a Handle to later bind the source of that StreamCore. 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<R, T> PushInto<FlatStack<R>> for T
where R: Region + Clone + 'static, T: CopyOnto<R>,

source§

fn push_into(self, target: &mut FlatStack<R>)

Push self into the target container.
source§

impl<T> PushInto<Vec<T>> for T

source§

fn push_into(self, target: &mut Vec<T>)

Push self into the target container.
source§

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

§

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>,

§

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>,

§

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<G> UnorderedInput<G> for G
where G: Scope,

source§

fn new_unordered_input<C>( &mut self ) -> ((UnorderedHandle<<G as ScopeParent>::Timestamp, C>, ActivateCapability<<G as ScopeParent>::Timestamp>), StreamCore<G, C>)
where C: Container,

Create a new capability-based StreamCore and UnorderedHandle through which to supply input. This input supports multiple open epochs (timestamps) at the same time. Read more
source§

impl<G> UnorderedInput<G> for G
where G: Scope,

source§

fn new_unordered_input<D>( &mut self ) -> ((UnorderedHandle<<G as ScopeParent>::Timestamp, Vec<D>>, ActivateCapability<<G as ScopeParent>::Timestamp>), StreamCore<G, Vec<D>>)
where D: Data,

Create a new capability-based Stream and Handle through which to supply input. This input supports multiple open epochs (timestamps) at the same time. Read more
source§

impl<T> Data for T
where T: Clone + 'static,