adoroszlai commented on a change in pull request #3040:
URL: https://github.com/apache/ozone/pull/3040#discussion_r798827131



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ResolvedBucket.java
##########
@@ -108,4 +117,25 @@ public boolean isLink() {
     return auditMap;
   }
 
+  /**
+   * Adds audit information about the bucket and its bucket layout (and if it's
+   * a link, then the real bucket, too) to {@code auditMap}.
+   *
+   * @return the same map for convenience
+   */
+  public Map<String, String> auditWithBucketLayout(Map<String, String> 
auditMap,
+                                                   OzoneManager om) {
+    audit(auditMap);
+    try {
+      // Add BucketLayout to auditMap from the resolved Bucket.
+      auditMap.put(OzoneConsts.BUCKET_LAYOUT, String.valueOf(
+          om.getBucketInfo(realVolume(), realBucket()).getBucketLayout()

Review comment:
       I would definitely avoid passing around OM and having to look up bucket 
info.




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