You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/10/18 08:55:23 UTC

[GitHub] [ozone] aryangupta1998 commented on a change in pull request #2724: HDDS-5659. Use bucket layout specific DB table in OmMetadataManager.getKeyTable() - part1

aryangupta1998 commented on a change in pull request #2724:
URL: https://github.com/apache/ozone/pull/2724#discussion_r730709461



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/OMClientResponse.java
##########
@@ -46,6 +52,21 @@ public BucketLayout getBucketLayout() {
     return BucketLayout.DEFAULT;
   }
 
+  protected BucketLayout getBucketLayout(OMMetadataManager omMetadataManager,
+      String volName, String buckName) {
+    if (omMetadataManager == null) {
+      return BucketLayout.DEFAULT;
+    }
+    String buckKey = omMetadataManager.getBucketKey(volName, buckName);
+    try {
+      OmBucketInfo buckInfo = omMetadataManager.getBucketTable().get(buckKey);
+      return buckInfo.getBucketLayout();
+    } catch (IOException e) {
+      LOG.error("Cannot find the key: " + buckKey);

Review comment:
       Done




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org