pub struct Executor { /* private fields */ }Expand description
The Host-only L3 executor of one rank. Dropping it closes it (see
Executor::close), waiting a few seconds for the workers.
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn start(
store: Box<dyn Store>,
host: HostBuffer,
layout: HostLayout,
namespace: Namespace,
weight_version: &str,
config: ExecutorConfig,
clock: Clock,
) -> Self
pub fn start( store: Box<dyn Store>, host: HostBuffer, layout: HostLayout, namespace: Namespace, weight_version: &str, config: ExecutorConfig, clock: Clock, ) -> Self
Start the workers over store, which reads and writes host, laid
out as layout; objects are named in namespace under
weight_version.
Sourcepub fn config(&self) -> ExecutorConfig
pub fn config(&self) -> ExecutorConfig
The limits and workers it started with.
Sourcepub fn key_prefix(&self) -> String
pub fn key_prefix(&self) -> String
The namespace prefix objects are named under now.
Sourcepub fn submit(&self, operations: &[Operation]) -> Result<(), ExecutorError>
pub fn submit(&self, operations: &[Operation]) -> Result<(), ExecutorError>
Start a plan’s storage operations, in order; none waits for I/O.
Sourcepub fn poll(&self) -> StoragePoll
pub fn poll(&self) -> StoragePoll
The operations finished since the last poll and the queues’ pressure, under one lock and without I/O. A running cancelled job still counts: detaching its request does not retire its native I/O.
Sourcepub fn snapshot(&self) -> L3ExecutorSnapshot
pub fn snapshot(&self) -> L3ExecutorSnapshot
The counters, without backend or GPU work. Completed jobs count until a poll delivers them.
Sourcepub fn set_weight_version(
&self,
weight_version: &str,
) -> Result<(), ExecutorError>
pub fn set_weight_version( &self, weight_version: &str, ) -> Result<(), ExecutorError>
Switch the namespace to weight_version, after the replica agreed to
clear the caches.
Sourcepub fn delete_namespace(&self) -> bool
pub fn delete_namespace(&self) -> bool
Delete the namespace’s objects once idle: true when they are gone.
Sourcepub fn close(&mut self, timeout: Duration) -> Result<(), ExecutorError>
pub fn close(&mut self, timeout: Duration) -> Result<(), ExecutorError>
Stop the workers within timeout and release the store; a later
call does nothing. If a worker is still in native I/O, or some I/O
never proved its retirement, the store stays connected for the rest
of the process and the caller must keep the Host pool alive too.