[
https://issues.apache.org/jira/browse/YARN-11241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17597687#comment-17597687
]
ASF GitHub Bot commented on YARN-11241:
---------------------------------------
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.
> Add uncleaning option for local app log file with log-aggregation enabled
> -------------------------------------------------------------------------
>
> Key: YARN-11241
> URL: https://issues.apache.org/jira/browse/YARN-11241
> Project: Hadoop YARN
> Issue Type: New Feature
> Components: log-aggregation
> Reporter: groot
> Assignee: groot
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Add uncleaning option for local app log file with log-aggregation enabled
> This will be helpful for debugging purpose.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]