Author: omalley
Date: Fri Mar  4 04:55:18 2011
New Revision: 1077786

URL: http://svn.apache.org/viewvc?rev=1077786&view=rev
Log:
commit 3a653bd9d9e12e346df9edac8624a15b714837c9
Author: Krishna Ramachandran <[email protected]>
Date:   Fri Feb 4 12:40:12 2011 -0800

    Fix Ticket 3437531 TaskDiagnosticInfo may be missed sometime
    
    +++ b/YAHOO-CHANGES.txt
    +     TaskDiagnosticInfo may be missed sometime. (ramach)
    +

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=1077786&r1=1077785&r2=1077786&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 04:55:18 2011
@@ -223,6 +223,11 @@ class TaskMemoryManagerThread extends Th
                     + tid + " : \n" + pTree.getProcessTreeDump();
             LOG.warn(msg);
             // kill the task
+            TaskInProgress tip = taskTracker.runningTasks.get(tid);
+            if (tip != null) {
+              String[] diag = msg.split("\n");
+              tip.getStatus().setDiagnosticInfo(diag[0]);
+            }
             taskTracker.cleanUpOverMemoryTask(tid, true, msg);
 
             it.remove();
@@ -351,8 +356,13 @@ class TaskMemoryManagerThread extends Th
         String msg =
             "Killing one of the least progress tasks - " + tid
                 + ", as the cumulative memory usage of all the tasks on "
-                + "the TaskTracker exceeds virtual memory limit "
+                + "the TaskTracker " + taskTracker.localHostname 
+                + " exceeds virtual memory limit "
                 + maxMemoryAllowedForAllTasks + ".";
+        TaskInProgress tip = taskTracker.runningTasks.get(tid);
+        if (tip != null) {
+           tip.getStatus().setDiagnosticInfo(msg);
+        }
         LOG.warn(msg);
         // Kill the task and mark it as killed.
         taskTracker.cleanUpOverMemoryTask(tid, false, msg);


Reply via email to