OnConnectedStream

class OnConnectedStream[IN1, IN2](stream: ConnectedStreams[IN1, IN2])

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

Type parameters:
IN1

The type of the data stream items coming from the first connection

IN2

The type of the data stream items coming from the second connection

Value parameters:
stream

The wrapped data stream

class Object
trait Matchable
class Any

Value members

Concrete methods

@PublicEvolving
def flatMapWith[R : TypeInformation](flatMap1: IN1 => IterableOnce[R], flatMap2: IN2 => IterableOnce[R]): DataStream[R]

Applies a CoFlatMap transformation on the connected streams.

Applies a CoFlatMap transformation on the connected streams.

The transformation consists of two separate functions, where the first one is called for each element of the first connected stream, and the second one is called for each element of the second connected stream.

Value parameters:
flatMap1

Function called per element of the first input.

flatMap2

Function called per element of the second input.

Returns:

The resulting data stream.

@PublicEvolving
def keyingBy[KEY : TypeInformation](key1: IN1 => KEY, key2: IN2 => KEY): ConnectedStreams[IN1, IN2]

Keys the two connected streams together. After this operation, all elements with the same key from both streams will be sent to the same parallel instance of the transformation functions.

Keys the two connected streams together. After this operation, all elements with the same key from both streams will be sent to the same parallel instance of the transformation functions.

Value parameters:
key1

The first stream's key function

key2

The second stream's key function

Returns:

The key-grouped connected streams

@PublicEvolving
def mapWith[R : TypeInformation](map1: IN1 => R, map2: IN2 => R): DataStream[R]

Applies a CoMap transformation on the connected streams.

Applies a CoMap transformation on the connected streams.

The transformation consists of two separate functions, where the first one is called for each element of the first connected stream, and the second one is called for each element of the second connected stream.

Value parameters:
map1

Function called per element of the first input.

map2

Function called per element of the second input.

Returns:

The resulting data stream.