[英]What is the default WindowBytesStoreSupplier for stream-stream join in Kafka Streams?
The new API has a signature of:新的 API 具有以下特征:
join(KStream<K,VO> otherStream, ValueJoiner<? super V,? super VO,? extends VR> joiner, JoinWindows windows, StreamJoined<K,V,VO> streamJoined)
If I only set store name using StreamJoined<K,V,VO> streamJoined
parameter, what would be the default configuration of WindowBytesStoreSupplier
in terms of retentionPeriod
, windowSize
and retainDuplicates
?如果我只使用
StreamJoined<K,V,VO> streamJoined
参数设置商店名称,那么WindowBytesStoreSupplier
在retentionPeriod
、 windowSize
和retainDuplicates
方面的默认配置是什么? It's not clear from documentation.从文档中不清楚。 Is this an in memory state store?
这是在 memory state 商店吗? Or default one configured by Kafka Streams?
还是 Kafka Streams 配置的默认配置?
If you only set the store name with StreamJoined
then:如果您仅使用
StreamJoined
设置商店名称,则:
windowSize
comes from what you provide the JoinWindows
configuration object. windowSize
来自您提供的JoinWindows
配置 object。 Even if you use a custom WindowBytesStoreSupplier
, Kafka Streams validates that the supplier window settings match the settings of the provided JoinWindows
object.WindowBytesStoreSupplier
,Kafka Streams 也会验证供应商 window 设置是否与提供的JoinWindows
object 的设置相匹配。 So a JoinWindows.of(Duration.ofSeconds(30))
would have a windowSize
equal to 30000
ms.JoinWindows.of(Duration.ofSeconds(30))
的windowSize
等于30000
毫秒。retentionPeriod
is the window size + the grace period. retentionPeriod
期是 window 大小 + 宽限期。 The default grace period is 24 hours.retainDuplicates
configuration is true
. retainDuplicates
配置为true
。 But even when providing a custom StoreSupplier
, the retainDuplicates
field must be set to true
.StoreSupplier
时, retainDuplicates
字段也必须设置为true
。 Also, note that with StreamJoined
, you can now provide your own StoreSupplier
for both sides of the join, so it's possible to have in-memory stores.另外,请注意,使用
StreamJoined
,您现在可以为连接的双方提供自己的StoreSupplier
,因此可以拥有内存存储。
HTH,高温下,
Bill账单
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.