JoinedStreams

org.apache.flink.api.JoinedStreams
@Public
class JoinedStreams[T1, T2](input1: DataStream[T1], input2: DataStream[T2])

JoinedStreams represents two DataStreams that have been joined. A streaming join operation is evaluated over elements in a window.

To finalize the join operation you also need to specify a KeySelector for both the first and second input and a WindowAssigner

Note: Right now, the groups are being built in memory so you need to ensure that they don't get too big. Otherwise the JVM might crash.

Example:

val one: DataStream[(String, Int)]  = ...
val two: DataStream[(String, Int)] = ...

val result = one.join(two)
   .where {t => ... }
   .equal {t => ... }
   .window(TumblingEventTimeWindows.of(Time.of(5, TimeUnit.SECONDS)))
   .apply(new MyJoinFunction())
}

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Classlikes

class Where[KEY](keySelector1: KeySelector[T1, KEY], keyType: TypeInformation[KEY])

A join operation that has a KeySelector defined for the first input.

A join operation that has a KeySelector defined for the first input.

You need to specify a KeySelector for the second input using equalTo before you can proceed with specifying a WindowAssigner using EqualTo.window.

Attributes

KEY

Type of the key. This must be the same for both inputs

Graph
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def where[KEY : TypeInformation](keySelector: T1 => KEY): Where[KEY]

Specifies a KeySelector for elements from the first input.

Specifies a KeySelector for elements from the first input.

Attributes