Bladeren bron

Merge r1601980 from trunk. YARN-2125. Changed ProportionalCapacityPreemptionPolicy to log CSV in debug level. Contributed by Wangda Tan

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1601981 13f79535-47bb-0310-9956-ffa450edef68
Jian He 11 jaren geleden
bovenliggende
commit
279c5a3752

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

@@ -143,6 +143,9 @@ Release 2.5.0 - UNRELEASED
     YARN-2091. Add more values to ContainerExitStatus and pass it from NM to
     YARN-2091. Add more values to ContainerExitStatus and pass it from NM to
     RM and then to app masters (Tsuyoshi OZAWA via bikas)
     RM and then to app masters (Tsuyoshi OZAWA via bikas)
 
 
+    YARN-2125. Changed ProportionalCapacityPreemptionPolicy to log CSV in debug
+    level. (Wangda Tan via jianhe)
+
   OPTIMIZATIONS
   OPTIMIZATIONS
 
 
   BUG FIXES 
   BUG FIXES 

+ 4 - 2
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/ProportionalCapacityPreemptionPolicy.java

@@ -208,7 +208,9 @@ public class ProportionalCapacityPreemptionPolicy implements SchedulingEditPolic
     Map<ApplicationAttemptId,Set<RMContainer>> toPreempt =
     Map<ApplicationAttemptId,Set<RMContainer>> toPreempt =
         getContainersToPreempt(queues, clusterResources);
         getContainersToPreempt(queues, clusterResources);
 
 
-    logToCSV(queues);
+    if (LOG.isDebugEnabled()) {
+      logToCSV(queues);
+    }
 
 
     // if we are in observeOnly mode return before any action is taken
     // if we are in observeOnly mode return before any action is taken
     if (observeOnly) {
     if (observeOnly) {
@@ -608,7 +610,7 @@ public class ProportionalCapacityPreemptionPolicy implements SchedulingEditPolic
       sb.append(", ");
       sb.append(", ");
       tq.appendLogString(sb);
       tq.appendLogString(sb);
     }
     }
-    LOG.info(sb.toString());
+    LOG.debug(sb.toString());
   }
   }
 
 
   /**
   /**