hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravip...@apache.org
Subject svn commit: r1589597 - /hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java
Date Thu, 24 Apr 2014 06:05:31 GMT
Author: raviprak
Date: Thu Apr 24 06:05:31 2014
New Revision: 1589597

URL: http://svn.apache.org/r1589597
Log:
MAPREDUCE-5846. Rumen doesn't understand JobQueueChangedEvent (Nathan Roberts via raviprak)

Modified:
    hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java

Modified: hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java?rev=1589597&r1=1589596&r2=1589597&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/JobBuilder.java
Thu Apr 24 06:05:31 2014
@@ -38,6 +38,7 @@ import org.apache.hadoop.mapreduce.jobhi
 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()));



Mime
View raw message