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


##########
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:
   In the `RockDbIterator`,` makeNext` is public, so I change our method from 
`protected` to `public`
   you can see `RockDbIterator` actually extend `AbstractIterator` and 
implement `MangedKeyValueIterator` and it get data from public `makeNext` 
method, so we actually can do the same thing.
   



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