Author: tomwhite
Date: Fri Aug 6 17:52:02 2010
New Revision: 983069
URL: http://svn.apache.org/viewvc?rev=983069&view=rev
Log:
Merge -r 957895:957896 from trunk to branch-0.21. Fixes: MAPREDUCE-1876
Modified:
hadoop/mapreduce/branches/branch-0.21/CHANGES.txt
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
Modified: hadoop/mapreduce/branches/branch-0.21/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/CHANGES.txt?rev=983069&r1=983068&r2=983069&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/branch-0.21/CHANGES.txt Fri Aug 6 17:52:02 2010
@@ -1496,3 +1496,6 @@ Release 0.21.0 - 2010-07-01
MAPREDUCE-1942. 'compile-fault-inject' should never be called directly.
(Konstantin Boudnik)
+
+ MAPREDUCE-1876. Fixes TaskAttemptStartedEvent to correctly log event type
+ for all task types. (Amar Kamat via amareshwari)
\ No newline at end of file
Modified:
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
URL:
http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java?rev=983069&r1=983068&r2=983069&view=diff
==============================================================================
---
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
(original)
+++
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
Fri Aug 6 17:52:02 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;
}
}