public class JoinedStreams<T1,T2> extends Object
JoinedStreams
represents two DataStream
s 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())
}
Modifier and Type | Class and Description |
---|---|
class |
JoinedStreams.Where<KEY>
A join operation that has a
KeySelector defined for the first input. |
Constructor and Description |
---|
JoinedStreams(DataStream<T1> input1,
DataStream<T2> input2) |
Modifier and Type | Method and Description |
---|---|
<F> F |
clean(F f)
Returns a "closure-cleaned" version of the given function.
|
<KEY> JoinedStreams.Where<KEY> |
where(scala.Function1<T1,KEY> keySelector,
TypeInformation<KEY> evidence$1)
Specifies a
KeySelector for elements from the first input. |
public JoinedStreams(DataStream<T1> input1, DataStream<T2> input2)
public <KEY> JoinedStreams.Where<KEY> where(scala.Function1<T1,KEY> keySelector, TypeInformation<KEY> evidence$1)
KeySelector
for elements from the first input.public <F> F clean(F f)
ExecutionConfig
.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.