[ 
https://issues.apache.org/jira/browse/HDDS-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16689010#comment-16689010
 ] 

Xiaoyu Yao commented on HDDS-120:
---------------------------------

[~arpitagarwal]/[~dineshchitlangia], if we conditionally create the auditmsg 
object as needed like below, we should be able to avoid the object creation if 
not needed. The other choice it to delay the message creation down inside AUDIT 
class, that will be cleaner in the dispatcher class. 

 

{code}

if (AUDIT.getLogger().isInfoEnabled()) {
  amsg = buildAuditMessageForSuccess(action, params);
  if (eventType == EventType.READ) {
    AUDIT.logReadSuccess(amsg);
  } else {
    AUDIT.logWriteSuccess(amsg);
  }
}

{code}

> Adding HDDS datanode Audit Log
> ------------------------------
>
>                 Key: HDDS-120
>                 URL: https://issues.apache.org/jira/browse/HDDS-120
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Xiaoyu Yao
>            Assignee: Dinesh Chitlangia
>            Priority: Major
>              Labels: alpha2, logging
>         Attachments: HDDS-120.001.patch, HDDS-120.002.patch, 
> HDDS-120.003.patch, HDDS-120.004.patch, HDDS-120.005.patch, HDDS-120.006.patch
>
>
> This can be useful to find users who overload the DNs. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to