[
https://issues.apache.org/jira/browse/HDFS-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andy Isaacson reassigned HDFS-3569:
-----------------------------------
Assignee: Andy Isaacson
> clean up isInfoEnabled usage re logAuditEvent
> ----------------------------------------------
>
> Key: HDFS-3569
> URL: https://issues.apache.org/jira/browse/HDFS-3569
> Project: Hadoop HDFS
> Issue Type: Task
> Affects Versions: 2.0.0-alpha
> Reporter: Andy Isaacson
> Assignee: Andy Isaacson
>
> From HDFS-3535 we have
> {quote}
> Normally the checks are used before the method invocation if we're doing
> expensive things to create the args (eg lots of string concatenation) not to
> save the cost of the method invocation. Doesn't look like that's the case
> here (we're not constructing args) so we could just call logAuditEvent
> directly everywhere.
> There are a bunch of uses of logAuditEvent that do need to check if audit
> logging is enabled before constructing log messages, etc. I considered
> refactoring them all and concluded that it was out of scope for this change.
> I decided not to change the existing idiom (verbose though it is) before
> refactoring all users of the interface, which should be a separate change.
> {quote}
> There are lots of
> {code}
> if (isFile && auditLog.isInfoEnabled() && isExternalInvocation()) {
> logAuditEvent(UserGroupInformation.getCurrentUser(),
> }
> {code}
> that can easily be condensed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira