OnDataStream

class OnDataStream[T](stream: DataStream[T])

Wraps a data stream, allowing to use anonymous partial functions to perform extraction of items in a tuple, case class instance or collection

Type parameters:
T

The type of the data stream items

Value parameters:
stream

The wrapped data stream

class Object
trait Matchable
class Any

Value members

Concrete methods

@PublicEvolving
def filterWith(fun: T => Boolean): DataStream[T]

Applies a predicate fun to each item of the stream, keeping only those for which the predicate holds

Applies a predicate fun to each item of the stream, keeping only those for which the predicate holds

Value parameters:
fun

The predicate to be tested on each item

Returns:

A dataset of R

@PublicEvolving
def flatMapWith[R : TypeInformation](fun: T => IterableOnce[R]): DataStream[R]

Applies a function fun to each item of the stream, producing a collection of items that will be flattened in the resulting stream

Applies a function fun to each item of the stream, producing a collection of items that will be flattened in the resulting stream

Type parameters:
R

The type of the items in the returned stream

Value parameters:
fun

The function to be applied to each item

Returns:

A dataset of R

@PublicEvolving
def keyingBy[K : TypeInformation](fun: T => K): KeyedStream[T, K]

Keys the items according to a keying function fun

Keys the items according to a keying function fun

Type parameters:
K

The type of the key, for which type information must be known

Value parameters:
fun

The keying function

Returns:

A stream of Ts keyed by Ks

@PublicEvolving
def mapWith[R : TypeInformation](fun: T => R): DataStream[R]

Applies a function fun to each item of the stream

Applies a function fun to each item of the stream

Type parameters:
R

The type of the items in the returned stream

Value parameters:
fun

The function to be applied to each item

Returns:

A dataset of R