avijayanhwx commented on a change in pull request #648: HDDS-1340. Add List
Containers API for Recon
URL: https://github.com/apache/hadoop/pull/648#discussion_r269657755
##########
File path:
hadoop-ozone/ozone-recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/ContainerDBServiceProviderImpl.java
##########
@@ -163,4 +165,21 @@ public Integer getCountForForContainerKeyPrefix(
return prefixes;
}
+ /**
+ * Iterate the DB to construct a unique set of containerIDs.
+ *
+ * @return List of containerIDs.
+ * @throws IOException
+ */
+ @Override
+ public Set<Long> getContainerIDList() throws IOException {
+ Set<Long> containerIDs = new HashSet<>();
Review comment:
(Minor) LinkedHashSet may be better if we want to preserve containerId
ordering on iteration.
----------------------------------------------------------------
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]