aajisaka commented on code in PR #4703:
URL: https://github.com/apache/hadoop/pull/4703#discussion_r958178418
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/AppLogAggregatorImpl.java:
##########
@@ -472,7 +476,9 @@ public void run() {
// do post clean up of log directories on any other exception
LOG.error("Error occurred while aggregating the log for the application "
+ appId, e);
- doAppLogAggregationPostCleanUp();
+ if (enableLocalCleanup) {
+ doAppLogAggregationPostCleanUp();
+ }
Review Comment:
As `enableLocalCleanup` isn't local variable, can we skip cleanup in the
`doAppLogAggregationPostCleanUp()`?
```java
private void doAppLogAggregationPostCleanUp() {
if (!enableLocalCleanup) {
return;
}
```
That way we can change only one place.
--
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]