In fact, RocksDbWindowBytesStoreSupplier is the one and only known WindowBytesStoreSupplier.

RocksDbWindowBytesStoreSupplier uses rocksdb-window-state as the metrics scope.

RocksDbWindowBytesStoreSupplier is created when Stores factory is requested to persistentWindowStore.

import org.apache.kafka.streams.state.Stores
val windowStore = Stores.persistentWindowStore("window-store-name", 1000, 2, 1000, true)

scala> :type windowStore

import org.apache.kafka.streams.state.internals.RocksDbWindowBytesStoreSupplier

Creating State Store — get Method

WindowStore<Bytes, byte[]> get()
get is part of the StoreSupplier Contract to get a state store.

get creates a RocksDBSegmentedBytesStore (with the name, the retentionPeriod and the segments).

get then returns a new RocksDBWindowStore (with the RocksDBSegmentedBytesStore and the retainDuplicates and the windowSize).

Creating RocksDbWindowBytesStoreSupplier Instance

RocksDbWindowBytesStoreSupplier takes the following when created:

  • Name

  • retentionPeriod

  • Number of segments (must be 2 or higher)

  • windowSize

  • retainDuplicates flag

results matching ""

    No results matching ""