由于限制,我只能使用Flink v 1.4.2
。我正在研究窗口联接。
CustomObj.java(POJO)
class CustomObj{
public long timestampVal;
public int value;
}
我有2个数据流,例如:
StreamExecutionEnvironment currentEnv = getEnv();
currentEnv.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
StreamTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(currentEnv); TableEnvironment.getTableEnvironment(currentEnv);
DataStream<CustomObj> s1 = ...assignTimeStampsAndWatermarks(...)...
DataStream<CustomObj> s2 = ...assignTimeStampsAndWatermarks(...)...
tableEnv.registerDataStream("s1", s1);
tableEnv.registerDataStream("s2", s2);
我想做:
SELECT * FROM s1 INNER JOIN s2 ON s1.timestampVal = s2.timestampVal
但是,INNER JOIN
中不支持Flink V 1.4.2
进行流传输,因此我想知道是否可以进行某种TimeWindow连接?究竟如何运作?