Trait timely::dataflow::operators::exchange::Exchange
[−]
[src]
pub trait Exchange<D: Data> { fn exchange<F: Fn(&D) -> u64 + 'static>(&self, route: F) -> Self; }
Exchange records between workers.
Required Methods
fn exchange<F: Fn(&D) -> u64 + 'static>(&self, route: F) -> Self
Exchange records so that all records with the same route
are at the same worker.
Examples
use timely::dataflow::operators::{ToStream, ExchangeExtension, Inspect}; timely::example(|scope| { (0..10).to_stream(scope) .exchange(|&x| x) .inspect(|x| println!("seen: {:?}", x)); });