adoroszlai commented on code in PR #5718:
URL: https://github.com/apache/ozone/pull/5718#discussion_r1413175123


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/ozone/audit/AuditMessage.java:
##########
@@ -16,38 +16,33 @@
  */
 package org.apache.hadoop.ozone.audit;
 
+import org.apache.hadoop.ozone.audit.AuditLogger.PerformanceStringBuilder;
 import org.apache.logging.log4j.message.Message;
+import org.apache.ratis.util.MemoizedSupplier;
 
 import java.util.Map;
+import java.util.function.Supplier;
 
 /**
  * Defines audit message structure.
  */
 public final class AuditMessage implements Message {
-
-  private final String message;
-  private final String user;
-  private final String ip;
+  private final Supplier<String> messageSupplier;

Review Comment:
   Findbugs complains about this:
   
   ```
   M B Se: Class org.apache.hadoop.ozone.audit.AuditMessage defines 
non-transient non-serializable instance field messageSupplier  In 
AuditMessage.java
   M B Se: org.apache.ratis.util.MemoizedSupplier stored into non-transient 
field AuditMessage.messageSupplier  At AuditMessage.java:[line 38]
   ```
   
   I guess we can make it `transient`.
   
   (Sorry, I didn't notice `Message extends Serializable`.)



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