瀏覽代碼

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

Jason Lowe 9 年之前
父節點
當前提交
95b8700969

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

@@ -27,6 +27,9 @@ Release 2.6.5 - UNRELEASED
     YARN-4785. inconsistent value type of the "type" field for LeafQueueInfo in
     response of RM REST API. (Varun Vasudev via junping-du)
 
+    YARN-4773. Log aggregation performs extraneous filesystem operations when
+    rolling log aggregation is disabled (Jun Gong via jlowe)
+
 Release 2.6.4 - 2016-02-11
 
   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

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