mjsax commented on code in PR #14570:
URL: https://github.com/apache/kafka/pull/14570#discussion_r1382305032


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/KeyValueToTimestampedKeyValueByteStoreAdapter.java:
##########
@@ -180,5 +201,38 @@ public <PS extends Serializer<P>, P> 
KeyValueIterator<Bytes, byte[]> prefixScan(
     public long approximateNumEntries() {
         return store.approximateNumEntries();
     }
+}
 
+class WrappedRocksDbIterator extends AbstractIterator implements 
ManagedKeyValueIterator {
+    final private RocksDbIterator rocksDbIterator;
+    public WrappedRocksDbIterator(final RocksDbIterator rocksDbIterator) {
+        this.rocksDbIterator = rocksDbIterator;
+    }
+    @Override
+    protected Object makeNext() {
+        final KeyValue<Bytes, byte[]> next = rocksDbIterator.makeNext();

Review Comment:
   Not sure if I understand what you are trying to say? Can you elaborate?
   
   `makeNext` is not public API, but `protected` -- because this code "extends" 
`AbstractIterator` we are allowed to call `makeNext` but it seem not to be 
clean... Cf https://github.com/apache/kafka/pull/14570#discussion_r1379541488 
-- If we change this class to only `implements MangedKeyValueIterator` I 
believe we won't be able to call `makeNext` any longer, what indicates that we 
should not do it.



-- 
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