[英]How to select the type of time semantics when working with tumbling windows?
I am working on kafka streams windowing , particularly tumbling windows for my use case. 我正在研究kafka流窗口化,特别是在我的用例中滚动窗口。
TimeWindowedKStream<String, Blob> windowedStreams = groupedStreams
.windowedBy(TimeWindows.of(TimeUnit.MINUTES.toMillis(5)));
this is a tumbling window for 5 minutes per record key and advances by 5 minutes. 这是每个记录键5分钟的翻滚窗口,前进5分钟。 For my use case, I want no old message to be dropped and hence I want it to consider processing time as time semantic.
对于我的用例,我不希望删除任何旧消息,因此希望将处理时间视为时间语义。
what is the default behaviour of tumbling window for time semantics, how does I specify in tumbling windows which time semantic to pick ?event time/processing time/ingestion time. 时间语义的滚动窗口的默认行为是什么,如何在滚动窗口中指定选择哪种时间语义?事件时间/处理时间/摄取时间。
The time semantics are not specified on the window definition, but depend on the configured TimestampeExtractor
. 时间语义未在窗口定义中指定,但取决于已配置的
TimestampeExtractor
。 If you want to switch to processing time semantics, you can set default.timestamp.extractor
to WallclockTimestampExtractor.class
in the KafkaStreams
config. 如果要切换到处理时间语义,可以在
KafkaStreams
配置中将default.timestamp.extractor
设置为WallclockTimestampExtractor.class
。
Compare 相比
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.