hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Isaacson (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-3569) clean up isInfoEnabled usage re logAuditEvent
Date Tue, 26 Jun 2012 19:41:45 GMT
Andy Isaacson created HDFS-3569:

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

>From HDFS-3535 we have
    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.
There are lots of
    if (isFile && auditLog.isInfoEnabled() && isExternalInvocation()) {
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


View raw message