cda-group / arcon

State-first Streaming Applications in Rust
https://cda-group.github.io/arcon/
Apache License 2.0
175 stars 17 forks source link

KeyBy on Sources #301

Closed Max-Meldrum closed 2 years ago

Max-Meldrum commented 2 years ago

It is currently not possible to do key_by directly on a Source.

 let mut app = Application::with_conf(conf)
   .iterator((0..1000000).map(|x| Event { id: x, data: 1.5 }), |conf| {
      conf.set_timestamp_extractor(|x: &Event| x.id);
    })
   .key_by(|event: &Event| &event.id)