avijayanhwx commented on a change in pull request #987: HDDS-1685. Recon: Add
support for 'start' query param to containers…
URL: https://github.com/apache/hadoop/pull/987#discussion_r298427231
##########
File path:
hadoop-ozone/ozone-recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/ContainerDBServiceProviderImpl.java
##########
@@ -164,38 +206,49 @@ public Integer getCountForForContainerKeyPrefix(
return prefixes;
}
- /**
- * Get all the containers.
- *
- * @return Map of containerID -> containerMetadata.
- * @throws IOException
- */
- @Override
- public Map<Long, ContainerMetadata> getContainers() throws IOException {
- // Set a negative limit to get all the containers.
- return getContainers(-1);
- }
-
/**
* Iterate the DB to construct a Map of containerID -> containerMetadata
- * only for the given limit.
+ * only for the given limit from the given start key. The start containerID
+ * is skipped from the result.
*
* Return all the containers if limit < 0.
*
+ * @param limit No of containers to get.
+ * @param prevKey containerID after which the list of containers are scanned.
* @return Map of containerID -> containerMetadata.
* @throws IOException
*/
@Override
- public Map<Long, ContainerMetadata> getContainers(int limit)
+ public Map<Long, ContainerMetadata> getContainers(int limit, long prevKey)
Review comment:
Can we name the argument previousContainer instead of prevKey?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]