vcrfxia opened a new pull request, #13250:
URL: https://github.com/apache/kafka/pull/13250

   (This PR is stacked on https://github.com/apache/kafka/pull/13249. Only the 
last commit needs to be reviewed separately.)
   
   As part of introducing versioned key-value stores in 
[KIP-889](https://cwiki.apache.org/confluence/display/KAFKA/KIP-889%3A+Versioned+State+Stores),
 we'd like a way to represent a versioned key-value store 
(`VersionedKeyValueStore<Bytes, byte[]>`) as a regular key-value store 
(`KeyValueStore<Bytes, byte[]>`) in order to be compatible with existing DSL 
methods for passing key-value stores, e.g., 
[StreamsBuilder#table()](https://github.com/apache/kafka/blob/3012332e3d82947e434933efd4ab4e9366ab429d/streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java#L260)
 and [KTable 
methods](https://github.com/apache/kafka/blob/3012332e3d82947e434933efd4ab4e9366ab429d/streams/src/main/java/org/apache/kafka/streams/kstream/KTable.java#L153),
 which are explicitly typed to accept `Materialized<K, V, KeyValueStore<Bytes, 
byte[]>`. This way, we do not need to introduce new versions of all relevant 
StreamsBuilder and KTable methods to relax the Materialized type to accept 
versioned stores. 
   
   This PR introduces the new `VersionedBytesStore extends KeyValueStore<Bytes, 
byte[]>` interface for this purpose, along with the corresponding supplier 
(`VersionedBytesStoreSupplier`) and implementation 
(`RocksDbVersionedKeyValueBytesStoreSupplier`). The 
`RocksDbVersionedKeyValueBytesStoreSupplier` implementation leverages an 
adapter (`VersionedKeyValueToBytesStoreAdapter`) to assist in converting from 
`VersionedKeyValueStore` to `VersionedBytesStore`.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to