KAFKA-20304: Implement all required ReadOnly*Facade classes for headers stores#21743
KAFKA-20304: Implement all required ReadOnly*Facade classes for headers stores#21743aliehsaeedii wants to merge 6 commits intoapache:trunkfrom
Conversation
aliehsaeedii
left a comment
There was a problem hiding this comment.
I'm wondering if it makes sense to remove
- ReadOnlyKeyValueStoreFacadeTest (exists)
- ReadOnlyWindowStoreFacadeTest (exists)
- KeyValueIteratorFacadeTest (exists)
just to be consistent.
|
Yes, I had the same thought about removing these tests even before I read yoru comment. We can do a follow up PR or add here. Whatever you prefer. As a matter of fact, I am even wondering if we need to add all these sub-classes of the GenericXxx classes? How often do we use these sub-classes As you test code shows, we can easily instantiate GenericXxx directly, so I am wondering if we gain much by having all the sub-classes or if we could drop them, and let each user just use GenericXxx directly? |
The only real benefit of the subclasses is for TopologyTestDriver inheritance:
|
| static class KeyValueStoreFacade<K, V> extends ReadOnlyKeyValueStoreFacade<K, V> implements KeyValueStore<K, V> { | ||
| static class KeyValueStoreFacade<K, V> implements KeyValueStore<K, V> { | ||
| private final TimestampedKeyValueStore<K, V> inner; | ||
| private final GenericReadOnlyKeyValueStoreFacade<K, ValueAndTimestamp<V>, V> readFacade; |
There was a problem hiding this comment.
I don't think we need to have this as a member, but KeyValueStoreFacade can just inherit from GenericReadOnlyKeyValueStoreFacade directly.
I am going to just push a change for this (also removing unnecessary tests -- don't need to re-test what we inherit from GenericReadOnlyKeyValueStoreFacade in KeyValueStoreFacadeTest.
df0ccd4 to
7605a41
Compare
This PR
ReadOnly*Facadeclasses required to wrap headers store forbackward compatibility
ReadOnly*Facadeclasses to use generic infrastructure withconverter functions
Reviewers: Matthias J. Sax matthias@confluent.io