adoroszlai commented on code in PR #6329:
URL: https://github.com/apache/ozone/pull/6329#discussion_r1512507373
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java:
##########
@@ -187,6 +187,27 @@ public Map<String, String> toAuditMap() {
if (this.ownerName != null) {
auditMap.put(OzoneConsts.OWNER, this.ownerName);
}
+ if (this.quotaInBytesSet && quotaInBytes > 0 ||
+ !(this.quotaInBytes == OzoneConsts.QUOTA_RESET)) {
+ auditMap.put(OzoneConsts.QUOTA_IN_BYTES,
+ String.valueOf(this.quotaInBytes));
+ }
+ if (this.quotaInNamespaceSet && quotaInNamespace > 0 ||
+ !(this.quotaInNamespace == OzoneConsts.QUOTA_RESET)) {
+ auditMap.put(OzoneConsts.QUOTA_IN_NAMESPACE,
+ String.valueOf(this.quotaInNamespace));
+ }
+ if (this.bekInfo != null) {
+ auditMap.put(OzoneConsts.BUCKET_ENCRYPTION_KEY_NAME,
+ this.bekInfo.getKeyName());
+ }
+ if (this.defaultReplicationConfig != null) {
+ auditMap.put(OzoneConsts.REPLICATION_TYPE, String.valueOf(
+ this.defaultReplicationConfig.getType()));
+ auditMap.put(OzoneConsts.REPLICATION_FACTOR,
Review Comment:
"Factor" does not apply to EC, so I suggest using `REPLICATION_CONFIG`
instead.
```suggestion
auditMap.put(OzoneConsts.REPLICATION_CONFIG,
```
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java:
##########
@@ -187,6 +187,27 @@ public Map<String, String> toAuditMap() {
if (this.ownerName != null) {
auditMap.put(OzoneConsts.OWNER, this.ownerName);
}
+ if (this.quotaInBytesSet && quotaInBytes > 0 ||
+ !(this.quotaInBytes == OzoneConsts.QUOTA_RESET)) {
Review Comment:
nit: can be simplified?
```suggestion
(this.quotaInBytes != OzoneConsts.QUOTA_RESET)) {
```
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java:
##########
@@ -187,6 +187,27 @@ public Map<String, String> toAuditMap() {
if (this.ownerName != null) {
auditMap.put(OzoneConsts.OWNER, this.ownerName);
}
+ if (this.quotaInBytesSet && quotaInBytes > 0 ||
+ !(this.quotaInBytes == OzoneConsts.QUOTA_RESET)) {
+ auditMap.put(OzoneConsts.QUOTA_IN_BYTES,
+ String.valueOf(this.quotaInBytes));
+ }
+ if (this.quotaInNamespaceSet && quotaInNamespace > 0 ||
+ !(this.quotaInNamespace == OzoneConsts.QUOTA_RESET)) {
Review Comment:
nit: similarly
```suggestion
(this.quotaInNamespace != OzoneConsts.QUOTA_RESET)) {
```
--
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]