ivandika3 commented on code in PR #4585:
URL: https://github.com/apache/ozone/pull/4585#discussion_r1327951911
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/recovery/ReconOMMetadataManager.java:
##########
@@ -47,4 +50,59 @@ public interface ReconOMMetadataManager extends
OMMetadataManager {
* @return true if OM Tables are initialized, otherwise false.
*/
boolean isOmTablesInitialized();
+
+ /**
+ * Return a list of volumes owned by a given user; if user is null, returns
+ * all volumes.
+ *
+ * This method can be optimized by using username as a filter.
+ *
+ * @param startKey the start volume name determines where to start listing
+ * from, this key is excluded from the result. Returns all the volumes if
+ * it's null.
+ * @param maxKeys the maximum number of volumes to return.
+ * @return volumes with starting from <code>startKey</code> limited by
+ * <code>maxKeys</code>
+ */
+ List<OmVolumeArgs> listVolumes(String startKey,
+ int maxKeys) throws IOException;
+
+ /**
+ * Return all volumes in the file system.
+ * @return all the volumes from the OM DB.
+ */
+ List<OmVolumeArgs> listVolumes() throws IOException;
+
+ /**
+ * Check if volume exists in the OM table.
+ * @param volName volume name without any protocol prefix.
+ * @return true if volume exists, otherwise false.
+ * @throws IOException IOE
+ */
+ boolean volumeExists(String volName) throws IOException;
+
+ /**
+ * Returns a list of buckets represented by {@link OmBucketInfo} in the given
+ * volume.
+ *
+ * @param volumeName the name of the volume. If volumeName is empty, list
+ * all buckets in the cluster.
+ * @param startBucket the start bucket name. Only the buckets whose name is
+ * after this value will be included in the result. This key is excluded from
+ * the result.
+ * @param maxNumOfBuckets the maximum number of buckets to return. It ensures
+ * the size of the result will not exceed this limit.
+ * @return a list of buckets.
+ * @throws IOException
+ */
+ List<OmBucketInfo> listBucketsUnderVolume(String volumeName,
+ String startBucket, int maxNumOfBuckets) throws IOException;
+
+ /**
+ * List all buckets under a volume.
Review Comment:
The UI and `BucketEndpoint` will use `listBucketsUnderVolume(String
volumeName,
String startBucket, int maxNumOfBuckets)` instead of this method. This
method used in the `VolumeEntityHandler` and `RootEntityHandler` and stored for
compatibility reasons.
--
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]