Author: ddas
Date: Thu Mar 12 11:51:40 2009
New Revision: 752836
URL: http://svn.apache.org/viewvc?rev=752836&view=rev
Log:
HADOOP-5440. Fixes a problem to do with removing a taskId from the list of
taskIds that the TaskTracker's TaskMemoryManager manages. Contributed by
Amareshwari Sriramadasu.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
Modified: hadoop/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=752836&r1=752835&r2=752836&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Mar 12 11:51:40 2009
@@ -1015,6 +1015,10 @@
HADOOP-5333. libhdfs supports appending to files. (dhruba)
HADOOP-3998. Fix dfsclient exception when JVM is shutdown. (dhruba)
+
+ HADOOP-5440. Fixes a problem to do with removing a taskId from the list
+ of taskIds that the TaskTracker's TaskMemoryManager manages.
+ (Amareshwari Sriramadasu via ddas)
Release 0.19.1 - Unreleased
Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java?rev=752836&r1=752835&r2=752836&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
(original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskTracker.java Thu
Mar 12 11:51:40 2009
@@ -2180,11 +2180,18 @@
//
boolean needCleanup = false;
synchronized (this) {
+ // Remove the task from MemoryManager, if the task SUCCEEDED or FAILED.
+ // KILLED tasks are removed in method kill(), because Kill
+ // would result in launching a cleanup attempt before
+ // TaskRunner returns; if remove happens here, it would remove
+ // wrong task from memory manager.
+ if (done || !wasKilled) {
+ removeFromMemoryManager(task.getTaskID());
+ }
if (!done) {
if (!wasKilled) {
failures += 1;
setTaskFailState(true);
- removeFromMemoryManager(task.getTaskID());
// call the script here for the failed tasks.
if (debugCommand != null) {
String taskStdout ="";