swamirishi commented on code in PR #7200:
URL: https://github.com/apache/ozone/pull/7200#discussion_r1762070518
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -1976,6 +2032,27 @@ public Table.KeyValue<String, OmKeyInfo>
getPendingDeletionDir()
return null;
}
+ @Override
+ public TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>>
getPendingDeletionDirs()
+ throws IOException {
+ return this.getPendingDeletionDirs(null, null);
+ }
+
+ @Override
+ public TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>>
getPendingDeletionDirs(String volume,
+
String bucket)
+ throws IOException {
+
+ // Either both volume & bucket should be null or none of them should be
null.
+ if (!StringUtils.isBlank(volume) && StringUtils.isBlank(bucket) ||
+ StringUtils.isBlank(volume) && !StringUtils.isBlank(bucket)) {
+ throw new IOException("One of volume : " + volume + ", bucket: " +
bucket + " is empty. Either both should be " +
+ "empty or none of the arguments should be empty");
+ }
+ return StringUtils.isBlank(volume) ?
metadataManager.getDeletedDirTable().iterator() :
Review Comment:
I don't think there is a need for a different function that. @prashantpogde
@hemantk-12 what do you think?
--
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]