hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jia...@apache.org
Subject git commit: MAPREDUCE-6126. Fixed Rumen JobBuilder to ignore NormalizedResourceEvent. Contributed by Junping Du
Date Wed, 22 Oct 2014 17:57:59 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 75a9c894b -> 9b973b7c8


MAPREDUCE-6126. Fixed Rumen JobBuilder to ignore NormalizedResourceEvent. Contributed by Junping
Du

Conflicts:
	hadoop-mapreduce-project/CHANGES.txt


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/9b973b7c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/9b973b7c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/9b973b7c

Branch: refs/heads/branch-2
Commit: 9b973b7c83a5b78452b852860bc6c7a0bad1e2d0
Parents: 75a9c89
Author: Jian He <jianhe@apache.org>
Authored: Wed Oct 22 10:43:20 2014 -0700
Committer: Jian He <jianhe@apache.org>
Committed: Wed Oct 22 10:57:32 2014 -0700

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt                     |  3 +++
 .../java/org/apache/hadoop/tools/rumen/JobBuilder.java   | 11 ++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9b973b7c/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index ba8c673..76a7130 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -219,6 +219,9 @@ Release 2.6.0 - UNRELEASED
     MAPREDUCE-5542. Killing a job just as it finishes can generate an NPE in
     client (Rohith via jlowe)
 
+    MAPREDUCE-6126. Fixed Rumen JobBuilder to ignore NormalizedResourceEvent.
+    (Junping Du via jianhe)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9b973b7c/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java
b/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java
index 53eea4b..eaa9547 100644
--- a/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java
+++ b/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java
@@ -26,6 +26,8 @@ import java.util.StringTokenizer;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.mapred.TaskStatus;
 import org.apache.hadoop.mapreduce.TaskAttemptID;
 import org.apache.hadoop.mapreduce.TaskType;
@@ -42,6 +44,7 @@ import org.apache.hadoop.mapreduce.jobhistory.JobQueueChangeEvent;
 import org.apache.hadoop.mapreduce.jobhistory.JobUnsuccessfulCompletionEvent;
 import org.apache.hadoop.mapreduce.jobhistory.MapAttemptFinished;
 import org.apache.hadoop.mapreduce.jobhistory.MapAttemptFinishedEvent;
+import org.apache.hadoop.mapreduce.jobhistory.NormalizedResourceEvent;
 import org.apache.hadoop.mapreduce.jobhistory.ReduceAttemptFinished;
 import org.apache.hadoop.mapreduce.jobhistory.ReduceAttemptFinishedEvent;
 import org.apache.hadoop.mapreduce.jobhistory.TaskAttemptFinished;
@@ -66,6 +69,8 @@ public class JobBuilder {
   private static final long BYTES_IN_MEG =
       StringUtils.TraditionalBinaryPrefix.string2long("1m");
 
+  static final private Log LOG = LogFactory.getLog(JobBuilder.class);
+  
   private String jobID;
 
   private boolean finalized = false;
@@ -137,6 +142,9 @@ public class JobBuilder {
       // 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 NormalizedResourceEvent) {
+      // Log an warn message as NormalizedResourceEvent shouldn't be written.
+      LOG.warn("NormalizedResourceEvent should be ignored in history server.");
     } else if (event instanceof JobFinishedEvent) {
       processJobFinishedEvent((JobFinishedEvent) event);
     } else if (event instanceof JobInfoChangeEvent) {
@@ -173,7 +181,8 @@ public class JobBuilder {
       processTaskUpdatedEvent((TaskUpdatedEvent) event);
     } else
       throw new IllegalArgumentException(
-          "JobBuilder.process(HistoryEvent): unknown event type");
+          "JobBuilder.process(HistoryEvent): unknown event type:"
+          + event.getEventType() + " for event:" + event);
   }
 
   static String extract(Properties conf, String[] names, String defaultValue) {


Mime
View raw message