[−][src]Trait efflux::reducer::Reducer
Trait to represent the reduction stage of MapReduce.
All trait methods have sane defaults to match the Hadoop MapReduce implementation, allowing the developer to pick and choose what they customize without having to write a large amount of boilerplate.
Provided methods
fn setup(&mut self, _ctx: &mut Context)
Setup handler for the current Reducer
.
fn reduce(&mut self, key: &[u8], values: &[&[u8]], ctx: &mut Context)
Reduction handler for the current Reducer
.
The default implementation of this handler will emit each value against the key in the order they were received. This is typically the stage of interest for many MapReduce developers.
fn cleanup(&mut self, _ctx: &mut Context)
Cleanup handler for the current Reducer
.
Implementors
impl<R> Reducer for R where
R: FnMut(&[u8], &[&[u8]], &mut Context),
[src]
impl<R> Reducer for R where
R: FnMut(&[u8], &[&[u8]], &mut Context),
Enables raw functions to act as Reducer
types.