hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1489220 - in /hadoop/common/branches/branch-2/hadoop-mapreduce-project: ./ hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/ hadoop-mapreduce-client/hadoop-mapreduce-client-jobcl...
Date Mon, 03 Jun 2013 22:55:22 GMT
Author: acmurthy
Date: Mon Jun  3 22:55:22 2013
New Revision: 1489220

URL: http://svn.apache.org/r1489220
Log:
Merge -c 1489219 from trunk to branch-2 to fix MAPREDUCE-5296. Fix backward incompatibility
for JobControl by adding the omitted addJob. Contributed by Zhijie Shen.

Modified:
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/JobControl.java
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt?rev=1489220&r1=1489219&r2=1489220&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt Mon Jun  3 22:55:22
2013
@@ -347,6 +347,9 @@ Release 2.1.0-beta - UNRELEASED
     MAPREDUCE-5220. Fix backward incompatibility for TaskCompletionEvent by
     adding back setTaskID. (Zhijie Shen via acmurthy) 
 
+    MAPREDUCE-5296. Fix backward incompatibility for JobControl by adding the
+    omitted addJob. (Zhijie Shen via acmurthy) 
+
   BREAKDOWN OF HADOOP-8562 SUBTASKS
 
     MAPREDUCE-4739. Some MapReduce tests fail to find winutils.

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/JobControl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/JobControl.java?rev=1489220&r1=1489219&r2=1489220&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/JobControl.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/JobControl.java
Mon Jun  3 22:55:22 2013
@@ -29,6 +29,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.mapred.jobcontrol.Job;
 import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State;
 import org.apache.hadoop.util.StringUtils;
 
@@ -135,8 +136,8 @@ public class JobControl implements Runna
   }
 
   /**
-   * Add a new job.
-   * @param aJob the new job
+   * Add a new controlled job.
+   * @param aJob the new controlled job
    */
   synchronized public String addJob(ControlledJob aJob) {
     String id = this.getNextJobID();
@@ -145,7 +146,15 @@ public class JobControl implements Runna
     jobsInProgress.add(aJob);
     return id;	
   }
-	
+
+  /**
+   * Add a new job.
+   * @param aJob the new job
+   */
+  synchronized public String addJob(Job aJob) {
+    return addJob((ControlledJob) aJob);
+  }
+
   /**
    * Add a collection of jobs
    * 

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java?rev=1489220&r1=1489219&r2=1489220&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java
Mon Jun  3 22:55:22 2013
@@ -18,7 +18,9 @@
 
 package org.apache.hadoop.mapred.jobcontrol;
 
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import java.util.ArrayList;
 
@@ -29,6 +31,7 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.JobID;
+import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob;
 import org.junit.Test;
 
 /**
@@ -99,8 +102,8 @@ public class TestJobControl extends juni
     Job job_4 = new Job(jobConf_4, dependingJobs);
 
     JobControl theControl = new JobControl("Test");
-    theControl.addJob(job_1);
-    theControl.addJob(job_2);
+    theControl.addJob((ControlledJob) job_1);
+    theControl.addJob((ControlledJob) job_2);
     theControl.addJob(job_3);
     theControl.addJob(job_4);
 



Mime
View raw message