MAPREDUCE-5846. Rumen doesn't understand JobQueueChangedEvent (Nathan Roberts via raviprak)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1589595 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ravi Prakash 2014-04-24 05:59:28 +00:00
parent f36f0dde88
commit a93be7b46c
2 changed files with 13 additions and 0 deletions

View File

@ -185,6 +185,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

View File

@ -38,6 +38,7 @@
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 void process(HistoryEvent event) {
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 @@ private void processJobSubmittedEvent(JobSubmittedEvent event) {
}
}
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()));