hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r949932 - in /hadoop/common/branches/branch-0.20: CHANGES.txt src/mapred/org/apache/hadoop/mapreduce/Job.java src/mapred/org/apache/hadoop/mapreduce/JobContext.java src/test/org/apache/hadoop/mapreduce/TestMapReduceLocal.java
Date Tue, 01 Jun 2010 05:06:59 GMT
Author: sharad
Date: Tue Jun  1 05:06:59 2010
New Revision: 949932

URL: http://svn.apache.org/viewvc?rev=949932&view=rev
Log:
MAPREDUCE-118. Fix Job.getJobID(). Contributed by Amareshwari Sriramadasu.

Modified:
    hadoop/common/branches/branch-0.20/CHANGES.txt
    hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/Job.java
    hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/JobContext.java
    hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapreduce/TestMapReduceLocal.java

Modified: hadoop/common/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/CHANGES.txt?rev=949932&r1=949931&r2=949932&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20/CHANGES.txt Tue Jun  1 05:06:59 2010
@@ -32,6 +32,8 @@ Release 0.20.3 - Unreleased
     MAPREDUCE-1372. ConcurrentModificationException in JobInProgress.
     (Dick King and Amareshwari Sriramadasu via tomwhite)
 
+    MAPREDUCE-118. Fix Job.getJobID(). (Amareshwari Sriramadasu via sharad)
+
   IMPROVEMENTS
 
     MAPREDUCE-1407. Update javadoc in mapreduce.{Mapper,Reducer} to match

Modified: hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/Job.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/Job.java?rev=949932&r1=949931&r2=949932&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/Job.java (original)
+++ hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/Job.java Tue
Jun  1 05:06:59 2010
@@ -430,6 +430,7 @@ public class Job extends JobContext {  
     ensureState(JobState.DEFINE);
     setUseNewAPI();
     info = jobClient.submitJobInternal(conf);
+    super.setJobID(info.getID());
     state = JobState.RUNNING;
    }
   

Modified: hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/JobContext.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/JobContext.java?rev=949932&r1=949931&r2=949932&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/JobContext.java
(original)
+++ hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapreduce/JobContext.java
Tue Jun  1 05:06:59 2010
@@ -46,13 +46,17 @@ public class JobContext {
     "mapreduce.partitioner.class";
 
   protected final org.apache.hadoop.mapred.JobConf conf;
-  private final JobID jobId;
+  private JobID jobId;
   
   public JobContext(Configuration conf, JobID jobId) {
     this.conf = new org.apache.hadoop.mapred.JobConf(conf);
     this.jobId = jobId;
   }
 
+  void setJobID(JobID jobId) {
+    this.jobId = jobId;
+  }
+
   /**
    * Return the configuration for the job.
    * @return the shared configuration object

Modified: hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapreduce/TestMapReduceLocal.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapreduce/TestMapReduceLocal.java?rev=949932&r1=949931&r2=949932&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapreduce/TestMapReduceLocal.java
(original)
+++ hadoop/common/branches/branch-0.20/src/test/org/apache/hadoop/mapreduce/TestMapReduceLocal.java
Tue Jun  1 05:06:59 2010
@@ -137,7 +137,9 @@ public class TestMapReduceLocal extends 
     job.setInputFormatClass(TrackingTextInputFormat.class);
     FileInputFormat.addInputPath(job, new Path(TEST_ROOT_DIR + "/in"));
     FileOutputFormat.setOutputPath(job, new Path(TEST_ROOT_DIR + "/out"));
+    assertNull(job.getJobID());
     assertTrue(job.waitForCompletion(false));
+    assertNotNull(job.getJobID());
     String out = readFile("out/part-r-00000");
     System.out.println(out);
     assertEquals("a\t1\ncount\t1\nis\t1\nmore\t1\nof\t1\ntest\t4\nthis\t1\nword\t1\n",



Mime
View raw message