Sfoglia il codice sorgente

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


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077037 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 anni fa
parent
commit
a9583343bb

+ 6 - 2
src/mapred/org/apache/hadoop/mapred/TaskMemoryManagerThread.java

@@ -50,6 +50,10 @@ class TaskMemoryManagerThread extends Thread {
   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 Thread {
           // 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)) {