浏览代码

YARN-4773. Log aggregation performs extraneous filesystem operations when rolling log aggregation is disabled. Contributed by Jun Gong

Jason Lowe 9 年之前
父节点
当前提交
49428ab6bb

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -115,6 +115,9 @@ Release 2.7.3 - UNRELEASED
     YARN-4183. Clarify the behavior of timeline service config properties
     YARN-4183. Clarify the behavior of timeline service config properties
     (Naganarasimha G R via sjlee)
     (Naganarasimha G R via sjlee)
 
 
+    YARN-4773. Log aggregation performs extraneous filesystem operations when
+    rolling log aggregation is disabled (Jun Gong via jlowe)
+
 Release 2.7.2 - 2016-01-25
 Release 2.7.2 - 2016-01-25
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 1 - 1
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

@@ -284,7 +284,7 @@ public class AppLogAggregatorImpl implements AppLogAggregator {
 
 
       // Before upload logs, make sure the number of existing logs
       // Before upload logs, make sure the number of existing logs
       // is smaller than the configured NM log aggregation retention size.
       // is smaller than the configured NM log aggregation retention size.
-      if (uploadedLogsInThisCycle) {
+      if (uploadedLogsInThisCycle && logAggregationInRolling) {
         cleanOldLogs();
         cleanOldLogs();
       }
       }