use of org.apache.flink.streaming.api.functions.windowing.AllWindowFunction in project flink by apache.
the class StateDescriptorPassingTest method testApplyWindowAllState.
@Test
public void testApplyWindowAllState() {
final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.registerTypeWithKryoSerializer(File.class, JavaSerializer.class);
// simulate ingestion time
DataStream<File> src = env.fromElements(new File("/")).assignTimestampsAndWatermarks(WatermarkStrategy.<File>forMonotonousTimestamps().withTimestampAssigner((file, ts) -> System.currentTimeMillis()));
SingleOutputStreamOperator<?> result = src.windowAll(TumblingEventTimeWindows.of(Time.milliseconds(1000))).apply(new AllWindowFunction<File, String, TimeWindow>() {
@Override
public void apply(TimeWindow window, Iterable<File> input, Collector<String> out) {
}
});
validateListStateDescriptorConfigured(result);
}
Aggregations