slfan1989 commented on PR #4293:
URL: https://github.com/apache/hadoop/pull/4293#issuecomment-1123836348
> LOG.isInfoEnabled()
When I was reading yarn's code, I found a similar usage in
NMAuditLogger.java or RMAuditLogger.java, as follows:
org.apache.hadoop.yarn.server.resourcemanager#logSuccess
```
public static void logSuccess(String user, String operation, String target,
ApplicationId appId, ContainerId containerId, Resource resource) {
if (LOG.isInfoEnabled()) {
LOG.info(createSuccessLog(user, operation, target, appId, null,
containerId, resource));
}
}
```
Some code data I read earlier pointed out that this method effectively
checks the log level, which is helpful for the performance of scenarios with
high concurrency. I would like to hear your opinion.
My consideration is the submitApplication of yarn federation, which is also
a high-performance scenario, so I added LOG.isInfoEnabled() check .
Line 450, according to my understanding should also be added.
--
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]