hemantk-12 commented on code in PR #5454:
URL: https://github.com/apache/ozone/pull/5454#discussion_r1362550225
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -535,42 +536,37 @@ public SnapshotDiffCleanupService
getSnapshotDiffCleanupService() {
* @param keyPrefix DB key prefix String
* @return endKey String, or null if no keys with such prefix is found
*/
- private static String findEndKeyGivenPrefix(
+ private static String performOperationGivenPrefix(
TableIterator<String, ? extends Table.KeyValue<String, ?>> keyIter,
- String keyPrefix) throws IOException {
-
- String endKey;
+ String keyPrefix, ThrowableFunction<Table.KeyValue<String, ?>,
+ Void, IOException> operationFunction) throws IOException {
+ String endKey = null;
keyIter.seek(keyPrefix);
Review Comment:
I think you can just use
[TableIterator#seekToFirst()](https://github.com/apache/ozone/blob/4b9b10f6206ed5c29c0c4957a651de1d24fe86f6/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStoreAbstractIterator.java#L117),
if you wanna get all keys starts with prefix.
--
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]