pub struct VanillaTask { /* private fields */ }Expand description
One task of a vanilla operation: a group of identical jobs.
Tasks are what makes a vanilla operation a distributed process rather than one program: each task says how many jobs of its kind to run, and the scheduler keeps that many going.
Implementations§
Source§impl VanillaTask
impl VanillaTask
Sourcepub fn new(
name: impl Into<String>,
command: impl Into<String>,
job_count: i64,
) -> Self
pub fn new( name: impl Into<String>, command: impl Into<String>, job_count: i64, ) -> Self
job_count jobs running command, under the name name.
The name shows up in the web interface and in the operation’s progress,
so lowercase_with_underscores and short is the convention.
Sourcepub fn with_local_file(self, path: impl Into<String>) -> Self
pub fn with_local_file(self, path: impl Into<String>) -> Self
Adds a Cypress file the jobs need — normally the worker binary.
Sourcepub fn with_local_file_named(
self,
path: impl Into<String>,
name: impl AsRef<str>,
) -> Self
pub fn with_local_file_named( self, path: impl Into<String>, name: impl AsRef<str>, ) -> Self
Adds a Cypress file under a different name in the sandbox.
Sourcepub fn with_outputs<O>(self, paths: O) -> Self
pub fn with_outputs<O>(self, paths: O) -> Self
Sets the tables these jobs write.
A vanilla task has no input, but it may have output: table k arrives
on the same 3k + 1 descriptor as anywhere else.
Sourcepub fn with_memory_limit(self, bytes: i64) -> Self
pub fn with_memory_limit(self, bytes: i64) -> Self
Sets the memory limit for these jobs, in bytes.
Sourcepub fn with_output_format(self, output: DataFormat) -> Self
pub fn with_output_format(self, output: DataFormat) -> Self
Selects the data format these jobs write.
Only the output direction, because a vanilla task has no input: there is
no input table for an input format to describe, and the one this spec
sends stays at the binary YSON every vanilla operation here has run
with. A Skiff selection must contain one table schema per output table
set by Self::with_outputs, in the same order.
Sourcepub fn with_skiff_output_format(self, output: SkiffFormat) -> Self
pub fn with_skiff_output_format(self, output: SkiffFormat) -> Self
Uses a validated Skiff format for these jobs’ output streams.
This compatibility convenience delegates to Self::with_output_format.
Trait Implementations§
Source§impl Clone for VanillaTask
impl Clone for VanillaTask
Source§fn clone(&self) -> VanillaTask
fn clone(&self) -> VanillaTask
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more