hemantk-12 commented on code in PR #7097:
URL: https://github.com/apache/ozone/pull/7097#discussion_r1750512743


##########
hadoop-ozone/interface-storage/src/main/java/org/apache/hadoop/ozone/om/OMMetadataManager.java:
##########
@@ -116,6 +116,22 @@ public interface OMMetadataManager extends 
DBStoreHAManager {
    */
   String getBucketKey(String volume, String bucket);
 
+  /**
+   * Given a volume and bucket, return the corresponding DB key prefix.
+   *
+   * @param volume - User name
+   * @param bucket - Bucket name
+   */
+  String getBucketKeyPrefix(String volume, String bucket);

Review Comment:
   The trailing slash is mainly used by snapshots as a key prefix. Also, [the 
comment](https://github.com/apache/ozone/blob/7a452ca2e84520c2fb15356fde38857cacb758c5/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java#L208)
 says that it is meant to be used in snapshots and should be moved out if used 
out snapshots. Since this will be used at other places, it is a good time to 
move them to `OmMetadataManager`.
   
   I'm fine if you create a Jira for it. My point was not to have duplicate 
functions sitting in multiple places.



-- 
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]

Reply via email to