From a8dd1c2cc245a82147c3015ad967eeb9704f0ade Mon Sep 17 00:00:00 2001 From: tanvipenumudy <46785609+tanvipenumudy@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:29:30 +0530 Subject: [PATCH] HDDS-10475. Refine audit logging for bucket creation (#6366) --- .../apache/hadoop/ozone/om/helpers/OmBucketInfo.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java index 9ec023cf90b..05e633fc804 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java @@ -329,6 +329,17 @@ public Map toAuditMap() { auditMap.put(OzoneConsts.USED_BYTES, String.valueOf(this.usedBytes)); auditMap.put(OzoneConsts.USED_NAMESPACE, String.valueOf(this.usedNamespace)); + auditMap.put(OzoneConsts.OWNER, this.owner); + auditMap.put(OzoneConsts.REPLICATION_TYPE, + (this.defaultReplicationConfig != null) ? + String.valueOf(this.defaultReplicationConfig.getType()) : null); + auditMap.put(OzoneConsts.REPLICATION_CONFIG, + (this.defaultReplicationConfig != null) ? + this.defaultReplicationConfig.getReplicationConfig() + .getReplication() : null); + auditMap.put(OzoneConsts.QUOTA_IN_BYTES, String.valueOf(this.quotaInBytes)); + auditMap.put(OzoneConsts.QUOTA_IN_NAMESPACE, + String.valueOf(this.quotaInNamespace)); return auditMap; }