hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1443799 - in /hadoop/common/branches/branch-2/hadoop-yarn-project: ./ hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ hadoop-yarn/hadoop-yarn-s...
Date Thu, 07 Feb 2013 23:57:42 GMT
Author: szetszwo
Date: Thu Feb  7 23:57:41 2013
New Revision: 1443799

URL: http://svn.apache.org/r1443799
Log:
svn merge -c 1443796 from trunk for YARN-377. Use the new StringUtils methods added by HADOOP-9252
and fix TestContainersMonitor.

Modified:
    hadoop/common/branches/branch-2/hadoop-yarn-project/   (props changed)
    hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java

Propchange: hadoop/common/branches/branch-2/hadoop-yarn-project/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Feb  7 23:57:41 2013
@@ -0,0 +1,3 @@
+/hadoop/common/branches/HDFS-3042/hadoop-yarn-project:1306184-1342109
+/hadoop/common/branches/branch-0.23-PB/hadoop-yarn-project:1227776-1294021
+/hadoop/common/trunk/hadoop-yarn-project:1161777,1161781,1162188,1162421,1162491,1162499,1162613,1162928,1162954,1162979,1163050,1163069,1163490,1163768,1163852,1163858,1163981,1164255,1164301,1164339,1166009,1166402,1167001,1167383,1167662,1170085,1170379,1170459,1171297,1172916,1173402,1176550,1177487,1177531,1177859,1177864,1182189,1182205,1182214,1189613,1189932,1189982,1195575,1196113,1196129,1204114,1204117,1204122,1204124,1204129,1204131,1204177,1204370,1204376,1204388,1205260,1205697,1206786,1206830,1207694,1208153,1208313,1212021,1212062,1212073,1212084,1213537,1213586,1213592-1213593,1213954,1214046,1220510,1221348,1225114,1225192,1225456,1225489,1225591,1226211,1226239,1226350,1227091,1227165,1227423,1227964,1229347,1230398,1231569,1231572,1231627,1231640,1233605,1234555,1235135,1235137,1235956,1236456,1239752,1240897,1240928,1243065,1243104,1244766,1245751,1245762,1293419,1295061,1295227,1296556,1298044,1298696,1298700,1299045,1299434,1299963,1301308,1301312,1301
 820,1301871,1302624,1302704-1302705,1303474,1304063,1304099,1304112,1304118,1305230,1309625,1310185,1311556,1312029,1329319,1333557,1334216,1342112,1348207,1349124,1349616,1351818,1361813,1373683,1374696,1375450,1375829,1379646,1400347,1430682,1430688,1440245,1443796

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt?rev=1443799&r1=1443798&r2=1443799&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt Thu Feb  7 23:57:41 2013
@@ -18,6 +18,9 @@ Release 2.0.4-beta - UNRELEASED
     YARN-385. Add missing fields - location and #containers to
     ResourceRequestPBImpl's toString(). (Sandy Ryza via sseth)
 
+    YARN-377. Use the new StringUtils methods added by HADOOP-9252 and fix
+    TestContainersMonitor.  (Chris Nauroth via szetszwo)
+
 Release 2.0.3-alpha - 2013-02-06 
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java?rev=1443799&r1=1443798&r2=1443799&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
Thu Feb  7 23:57:41 2013
@@ -28,7 +28,7 @@ import java.util.Map.Entry;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.util.StringUtils;
+import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.event.AsyncDispatcher;
@@ -125,10 +125,10 @@ public class ContainersMonitorImpl exten
         this.maxPmemAllottedForContainers >
         totalPhysicalMemoryOnNM * 0.80f) {
       LOG.warn("NodeManager configured with " +
-          StringUtils.humanReadableInt(maxPmemAllottedForContainers) +
+          TraditionalBinaryPrefix.long2String(maxPmemAllottedForContainers, "", 1) +
           " physical memory allocated to containers, which is more than " +
           "80% of the total physical memory available (" +
-          StringUtils.humanReadableInt(totalPhysicalMemoryOnNM) +
+          TraditionalBinaryPrefix.long2String(totalPhysicalMemoryOnNM, "", 1) +
           "). Thrashing might happen.");
     }
 
@@ -493,12 +493,12 @@ public class ContainersMonitorImpl exten
 
     private String formatUsageString(long currentVmemUsage, long vmemLimit,
         long currentPmemUsage, long pmemLimit) {
-      return String.format("%sb of %sb physical memory used; " +
-          "%sb of %sb virtual memory used",
-          StringUtils.humanReadableInt(currentPmemUsage),
-          StringUtils.humanReadableInt(pmemLimit),
-          StringUtils.humanReadableInt(currentVmemUsage),
-          StringUtils.humanReadableInt(vmemLimit));
+      return String.format("%sB of %sB physical memory used; " +
+          "%sB of %sB virtual memory used",
+          TraditionalBinaryPrefix.long2String(currentPmemUsage, "", 1),
+          TraditionalBinaryPrefix.long2String(pmemLimit, "", 1),
+          TraditionalBinaryPrefix.long2String(currentVmemUsage, "", 1),
+          TraditionalBinaryPrefix.long2String(vmemLimit, "", 1));
     }
   }
 

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java?rev=1443799&r1=1443798&r2=1443799&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
Thu Feb  7 23:57:41 2013
@@ -267,8 +267,8 @@ public class TestContainersMonitor exten
     String expectedMsgPattern =
         "Container \\[pid=" + pid + ",containerID=" + cId
             + "\\] is running beyond virtual memory limits. Current usage: "
-            + "[0-9.]+m?b of [0-9.]+m?b physical memory used; "
-            + "[0-9.]+m?b of [0-9.]+m?b virtual memory used. "
+            + "[0-9.]+ ?[KMGTPE]?B of [0-9.]+ ?[KMGTPE]?B physical memory used; "
+            + "[0-9.]+ ?[KMGTPE]?B of [0-9.]+ ?[KMGTPE]?B virtual memory used. "
             + "Killing container.\nDump of the process-tree for "
             + cId + " :\n";
     Pattern pat = Pattern.compile(expectedMsgPattern);



Mime
View raw message