pub struct MapReduceSpec { /* private fields */ }Expand description
A map-reduce operation.
The mapper is optional: without one, the input is fed straight to the reducer, which is how YTsaurus models a plain shuffle-and-reduce.
Implementations§
Source§impl MapReduceSpec
impl MapReduceSpec
Sourcepub fn new<I, O, K>(
reducer: impl Into<String>,
inputs: I,
outputs: O,
reduce_by: K,
) -> Selfwhere
I: IntoIterator,
I::Item: Into<String>,
O: IntoIterator,
O::Item: Into<String>,
K: IntoIterator,
K::Item: Into<String>,
pub fn new<I, O, K>(
reducer: impl Into<String>,
inputs: I,
outputs: O,
reduce_by: K,
) -> Selfwhere
I: IntoIterator,
I::Item: Into<String>,
O: IntoIterator,
O::Item: Into<String>,
K: IntoIterator,
K::Item: Into<String>,
A map-reduce running reducer over inputs, grouped by reduce_by.
Sourcepub fn with_mapper(self, command: impl Into<String>) -> Self
pub fn with_mapper(self, command: impl Into<String>) -> Self
Adds a mapper phase.
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 to both phases.
One binary usually serves both, dispatching on argv[1], so attaching
it to each phase separately would only be a way to forget one.
Sourcepub fn with_memory_limit(self, bytes: i64) -> Self
pub fn with_memory_limit(self, bytes: i64) -> Self
Sets the memory limit for both phases, in bytes.
Sourcepub fn with_sort_by<K>(self, columns: K) -> Self
pub fn with_sort_by<K>(self, columns: K) -> Self
Sets the sort columns, when they differ from the reduce columns.
Sourcepub fn without_key_switch(self) -> Self
pub fn without_key_switch(self) -> Self
Turns off key_switch delivery to the reducer.
Only useful for a reducer that does not group — with it off,
JobReader::groups sees the whole input as one group.
Trait Implementations§
Source§impl Clone for MapReduceSpec
impl Clone for MapReduceSpec
Source§fn clone(&self) -> MapReduceSpec
fn clone(&self) -> MapReduceSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MapReduceSpec
impl RefUnwindSafe for MapReduceSpec
impl Send for MapReduceSpec
impl Sync for MapReduceSpec
impl Unpin for MapReduceSpec
impl UnsafeUnpin for MapReduceSpec
impl UnwindSafe for MapReduceSpec
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