代码如下:
stream
.keyBy((KeySelector<Tuple2<String, Long>, String>) o -> o.f0)
.window(TumblingEventTimeWindows.of(Time.seconds(100)))
.trigger(ContinuousProcessingTimeTrigger.of(Time.seconds(2)))
.evictor(TimeEvictor.of(Time.seconds(0)))
.sum(1)
.print();
当 数据在窗口计算前被全部清除时,sum结果会是一个null,会传入print,导致 nullpoint
--
Sent from:
http://apache-flink.147419.n8.nabble.com/