hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1077037 - /hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskMemoryManagerThread.java
Date Fri, 04 Mar 2011 03:34:41 GMT
Author: omalley
Date: Fri Mar  4 03:34:41 2011
New Revision: 1077037

URL: http://svn.apache.org/viewvc?rev=1077037&view=rev
Log:
commit 9e14aa326f6ea639e4609e31bc2fe42d98751abf
Author: Hemanth Yamijala <yhemanth@yahoo-inc.com>
Date:   Sun Oct 25 17:41:49 2009 +0530

    MAPREDUCE:1090 from https://issues.apache.org/jira/secure/attachment/12423142/MAPREDUCE-1090-20.patch
    
    +++ b/YAHOO-CHANGES.txt
    +    MAPREDUCE-1090. Modified log statement in TaskMemoryManagerThread to
    +    include task attempt id. (yhemanth)
    +

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskMemoryManagerThread.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskMemoryManagerThread.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskMemoryManagerThread.java?rev=1077037&r1=1077036&r2=1077037&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskMemoryManagerThread.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskMemoryManagerThread.java
Fri Mar  4 03:34:41 2011
@@ -50,6 +50,10 @@ class TaskMemoryManagerThread extends Th
   private Map<TaskAttemptID, ProcessTreeInfo> tasksToBeAdded;
   private List<TaskAttemptID> tasksToBeRemoved;
 
+  private static final String MEMORY_USAGE_STRING =
+    "Memory usage of ProcessTree %s for task-id %s : %d bytes, " +
+      "limit : %d bytes";
+  
   public TaskMemoryManagerThread(TaskTracker taskTracker) {
     
     this(taskTracker.getTotalMemoryAllottedForTasksOnTT() * 1024 * 1024L,
@@ -210,8 +214,8 @@ class TaskMemoryManagerThread extends Th
           // are processes more than 1 iteration old.
           long curMemUsageOfAgedProcesses = pTree.getCumulativeVmem(1);
           long limit = ptInfo.getMemLimit();
-          LOG.info("Memory usage of ProcessTree " + pId + " :"
-              + currentMemUsage + "bytes. Limit : " + limit + "bytes");
+          LOG.info(String.format(MEMORY_USAGE_STRING, 
+                                pId, tid.toString(), currentMemUsage, limit));
 
           if (isProcessTreeOverLimit(tid.toString(), currentMemUsage, 
                                       curMemUsageOfAgedProcesses, limit)) {



Mime
View raw message