sumitagrawl commented on code in PR #8788:
URL: https://github.com/apache/ozone/pull/8788#discussion_r2215377307


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/util/SeekableIterator.java:
##########
@@ -25,4 +25,6 @@
  */
 public interface SeekableIterator<K, E> extends ClosableIterator<E> {
   void seek(K position) throws IOException;
+
+  K peekNextKey();

Review Comment:
   From above example, we keep moving till both are same, if one is less, then 
only move other. Only it depends how we consume object, so still its not 
satisfying why we need peekNextKey().
   Problem here is there is plan to have multi-threaded iterator, this new 
interface may not be possible to implement there, and extending the interface 
with non-standard function may behave differently.
   
   Already there is a complexity of releasing the object CodecBuffer which is 
no threadsafe.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to