Operators transform Dataflow into a new one. Users can write a program to combine these operators ino a sophisticated dataflow topologies
Dataflow -> Dataflow
Takes one element and produce a new element.
stream.map(v => v + "sss")
Dataflow -> Dataflow
Takes one element and produces zero, one, or more elements
// let stream: Dataflow<string> = ....
stream.flatMap(v => v.split("."))
Dataflow -> Dataflow
Evaluates a boolean function for each element and retains those for which the function returns true
// let stream: Dataflow<string> = ....
stream.filter(v => v.contains("foo"))
Dataflow -> KeyedDataflow
Logically partitions a stream into disjoint partitions. All records with the same key are assigned to the same partition.
For now, Lightflus does not support keyBy in parallelism.