[−][src]Trait efflux::mapper::Mapper
Trait to represent the mapping 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 Mapper
.
fn map(&mut self, key: usize, value: &[u8], ctx: &mut Context)
Mapping handler for the current Mapper
.
The default implementation is to simply emit each key/value pair as they are received, without any changes. As such, this is where most developers will immediately begin to change things.
fn cleanup(&mut self, _ctx: &mut Context)
Cleanup handler for the current Mapper
.
Implementors
impl<M> Mapper for M where
M: FnMut(usize, &[u8], &mut Context),
[src]
impl<M> Mapper for M where
M: FnMut(usize, &[u8], &mut Context),
Enables raw functions to act as Mapper
types.