ArafatKhan2198 commented on code in PR #6969:
URL: https://github.com/apache/ozone/pull/6969#discussion_r1798978723
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconUtils.java:
##########
@@ -596,6 +600,88 @@ public static long convertToEpochMillis(String dateString,
String dateFormat, Ti
}
}
+ /**
+ * Retrieves keys from the specified table based on pagination and prefix
filtering.
+ * This method handles different scenarios based on the presence of
startPrefix and prevKey,
+ * enabling efficient key retrieval from the table.
+ *
+ * The method handles the following cases:
+ *
+ * 1. prevKey provided, startPrefix empty:
+ * - Seeks to prevKey, skips it, and returns subsequent records up to the
limit.
+ *
+ * 2. prevKey empty, startPrefix empty:
+ * - Iterates from the beginning of the table, retrieving all records up to
the limit.
+ *
+ * 3. startPrefix provided, prevKey empty:
+ * - Seeks to the first key matching startPrefix and returns all matching
keys up to the limit.
+ *
+ * 4. startPrefix provided, prevKey provided:
+ * - Seeks to prevKey, skips it, and returns subsequent keys that match
startPrefix, up to the limit.
+ *
+ * This method also handles the following limit scenarios:
+ * - If limit = 0 or limit < -1, no records are returned.
+ * - If limit = -1, all records are returned.
+ * - For positive limits, it retrieves records up to the specified limit.
Review Comment:
Thanks for the help @adoroszlai it worked!
--
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]