hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amareshw...@apache.org
Subject svn commit: r957896 - in /hadoop/mapreduce/trunk: CHANGES.txt src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
Date Fri, 25 Jun 2010 11:46:13 GMT
Author: amareshwari
Date: Fri Jun 25 11:46:12 2010
New Revision: 957896

URL: http://svn.apache.org/viewvc?rev=957896&view=rev
Log:
MAPREDUCE-1876. Fixes TaskAttemptStartedEvent to correctly log event type for all task types.
Contributed by Amar Kamat

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=957896&r1=957895&r2=957896&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Fri Jun 25 11:46:12 2010
@@ -120,6 +120,9 @@ Trunk (unreleased changes)
     MAPREDUCE-1887. MRAsyncDiskService now properly absolutizes volume root
     paths. (Aaron Kimball via zshao)
 
+    MAPREDUCE-1876. Fixes TaskAttemptStartedEvent to correctly log event type
+    for all task types. (Amar Kamat via amareshwari)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java?rev=957896&r1=957895&r2=957896&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
Fri Jun 25 11:46:12 2010
@@ -81,7 +81,11 @@ public class TaskAttemptStartedEvent imp
   }
   /** Get the event type */
   public EventType getEventType() {
-    return EventType.MAP_ATTEMPT_STARTED;
+    // Note that the task type can be setup/map/reduce/cleanup but the 
+    // attempt-type can only be map/reduce.
+   return getTaskId().getTaskType() == TaskType.MAP 
+           ? EventType.MAP_ATTEMPT_STARTED 
+           : EventType.REDUCE_ATTEMPT_STARTED;
   }
 
 }



Mime
View raw message