From 5b201c3fcb8d93f56196e062fbfeb44f91be7818 Mon Sep 17 00:00:00 2001 From: Amar Kamat Date: Mon, 31 Oct 2011 16:19:05 +0000 Subject: [PATCH] MAPREDUCE-3241. [Rumen] Fix Rumen to ignore the AMStartedEvent. (amarrk) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1195548 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 2 ++ .../tools/org/apache/hadoop/tools/rumen/JobBuilder.java | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 045395273d1..39397f925c7 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1,4 +1,6 @@ Hadoop MapReduce Change Log + MAPREDUCE-3241. [Rumen] Fix Rumen to ignore the AMStartedEvent. (amarrk) + MAPREDUCE-3166. [Rumen] Make Rumen use job history api instead of relying on current history file name format. (Ravi Gummadi via amarrk) diff --git a/hadoop-mapreduce-project/src/tools/org/apache/hadoop/tools/rumen/JobBuilder.java b/hadoop-mapreduce-project/src/tools/org/apache/hadoop/tools/rumen/JobBuilder.java index 9aa9efb8022..457889b078f 100644 --- a/hadoop-mapreduce-project/src/tools/org/apache/hadoop/tools/rumen/JobBuilder.java +++ b/hadoop-mapreduce-project/src/tools/org/apache/hadoop/tools/rumen/JobBuilder.java @@ -28,6 +28,7 @@ import java.util.regex.Pattern; import org.apache.hadoop.mapred.TaskStatus; import org.apache.hadoop.mapreduce.TaskType; +import org.apache.hadoop.mapreduce.jobhistory.AMStartedEvent; import org.apache.hadoop.mapreduce.jobhistory.HistoryEvent; import org.apache.hadoop.mapreduce.jobhistory.JobFinishedEvent; import org.apache.hadoop.mapreduce.jobhistory.JobInfoChangeEvent; @@ -129,7 +130,11 @@ public class JobBuilder { } // these are in lexicographical order by class name. - if (event instanceof JobFinishedEvent) { + if (event instanceof AMStartedEvent) { + // ignore this event as Rumen currently doesnt need this event + //TODO Enhance Rumen to process this event and capture restarts + return; + } else if (event instanceof JobFinishedEvent) { processJobFinishedEvent((JobFinishedEvent) event); } else if (event instanceof JobInfoChangeEvent) { processJobInfoChangeEvent((JobInfoChangeEvent) event);