adoroszlai commented on code in PR #6969:
URL: https://github.com/apache/ozone/pull/6969#discussion_r1797277446
##########
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:
Use `{@code limit < -1}` to avoid javadoc failure. Also consider using
`{@code limit == 0}` and `{@code limit == -1}` for consistency.
Javadoc text is treated as HTML, and characters like `<` and `>` have
special meaning (start/end of HTML tag). Therefore they need to be escaped
when used as non-tag.
For the same reason, plain text formatting (e.g. empty lines for separating
paragraphs, `-` for list items) is lost when converted to HTML. Consider using
HTML formatting.
You may quickly check the rendered version in IDEA: mouse over the method
name, javadoc is displayed in tooltip.
--
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]