You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by ae...@apache.org on 2019/10/18 18:37:52 UTC

[hadoop-ozone] branch master updated: HDDS-2323. Mem allocation: Optimise AuditMessage::build(). Contributed by Siddharth Wagle.

This is an automated email from the ASF dual-hosted git repository.

aengineer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new b961883  HDDS-2323. Mem allocation: Optimise AuditMessage::build(). Contributed by Siddharth Wagle.
b961883 is described below

commit b9618834c9902fc8fd9ae12872092cfb1e5c1be3
Author: Anu Engineer <ae...@apache.org>
AuthorDate: Fri Oct 18 10:47:01 2019 -0700

    HDDS-2323. Mem allocation: Optimise AuditMessage::build().
    Contributed by Siddharth Wagle.
---
 .../src/main/java/org/apache/hadoop/ozone/audit/AuditMessage.java  | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/audit/AuditMessage.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/audit/AuditMessage.java
index 1569ffe..039d78e 100644
--- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/audit/AuditMessage.java
+++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/audit/AuditMessage.java
@@ -28,9 +28,6 @@ public class AuditMessage implements Message {
   private String message;
   private Throwable throwable;
 
-  private static final String MSG_PATTERN =
-      "user=%s | ip=%s | op=%s %s | ret=%s";
-
   public AuditMessage(){
 
   }
@@ -122,8 +119,8 @@ public class AuditMessage implements Message {
 
     public AuditMessage build(){
       AuditMessage auditMessage = new AuditMessage();
-      auditMessage.message = String.format(MSG_PATTERN,
-          this.user, this.ip, this.op, this.params, this.ret);
+      auditMessage.message = "user=" + this.user + " | ip=" + this.ip + " | " +
+          "op=" + this.op + " | " + "ret=" + this.ret;
       auditMessage.throwable = this.throwable;
       return auditMessage;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-commits-help@hadoop.apache.org