From 10510bf3249ff3779649791be35abe654a9ef1ea Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Thu, 24 Apr 2014 06:05:31 +0000 Subject: [PATCH] MAPREDUCE-5846. Rumen doesn't understand JobQueueChangedEvent (Nathan Roberts via raviprak) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1589597 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 2 ++ .../org/apache/hadoop/tools/rumen/JobBuilder.java | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 90bce0490e1..044311dae8a 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -49,6 +49,8 @@ Release 2.5.0 - UNRELEASED MAPREDUCE-5642. TestMiniMRChildTask fails on Windows. (Chuan Liu via cnauroth) + MAPREDUCE-5846. Rumen doesn't understand JobQueueChangedEvent (Nathan Roberts via raviprak) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES 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 2bc5062f9a5..53eea4bc8bb 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 @@ -38,6 +38,7 @@ import org.apache.hadoop.mapreduce.jobhistory.JobInitedEvent; import org.apache.hadoop.mapreduce.jobhistory.JobPriorityChangeEvent; import org.apache.hadoop.mapreduce.jobhistory.JobStatusChangedEvent; import org.apache.hadoop.mapreduce.jobhistory.JobSubmittedEvent; +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; @@ -144,6 +145,8 @@ public class JobBuilder { processJobInitedEvent((JobInitedEvent) event); } else if (event instanceof JobPriorityChangeEvent) { processJobPriorityChangeEvent((JobPriorityChangeEvent) event); + } else if (event instanceof JobQueueChangeEvent) { + processJobQueueChangeEvent((JobQueueChangeEvent) event); } else if (event instanceof JobStatusChangedEvent) { processJobStatusChangedEvent((JobStatusChangedEvent) event); } else if (event instanceof JobSubmittedEvent) { @@ -611,6 +614,14 @@ public class JobBuilder { } } + private void processJobQueueChangeEvent(JobQueueChangeEvent event) { + // set the queue name if existing + String queue = event.getJobQueueName(); + if (queue != null) { + result.setQueue(queue); + } + } + private void processJobStatusChangedEvent(JobStatusChangedEvent event) { result.setOutcome(Pre21JobHistoryConstants.Values .valueOf(event.getStatus()));