szetszwo commented on code in PR #8675:
URL: https://github.com/apache/ozone/pull/8675#discussion_r2165715641
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/TableIterator.java:
##########
@@ -54,4 +56,50 @@ public interface TableIterator<KEY, T> extends Iterator<T>,
Closeable {
*/
void removeFromDB() throws RocksDatabaseException, CodecException;
+ /**
+ * Convert the given {@link KeyValueIterator} to a {@link TableIterator}
using the given converter.
+ *
+ * @param <K> The key type of both the input and the output iterators
+ * @param <INPUT> The value type of the input iterator
+ * @param <OUTPUT> The value type of the output iterator
+ */
+ static <K, INPUT, OUTPUT> TableIterator<K, OUTPUT>
convert(KeyValueIterator<K, INPUT> i,
Review Comment:
No, it can't since the returned iterator needs a close() method for
releasing resources.
--
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]