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



##########
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 was skeptical of this approach as well but wasn't sure how else we 
could fetch the bucket layout. Since you already mentioned in another comment 
that we don't require this information added to the audit logs except in 
OmBucketInfo - I will remove these methods and their usages.




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