hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r597649 - in /lucene/hadoop/trunk: ./ src/java/org/apache/hadoop/mapred/ src/test/org/apache/hadoop/mapred/jobcontrol/
Date Fri, 23 Nov 2007 11:51:40 GMT
Author: acmurthy
Date: Fri Nov 23 03:51:38 2007
New Revision: 597649

URL: http://svn.apache.org/viewvc?rev=597649&view=rev
Log:
Reverting HADOOP-2245 since it can be significantly improved, specifically it copies code
into JobControlTestUtils from TestJobControl, and yet doesn't remove the original code. It
also introduced new compiler warnings which somehow weren't caught by the patch-process.

Removed:
    lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/JobControlTestUtils.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/TestLocalJobControl.java
Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=597649&r1=597648&r2=597649&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Fri Nov 23 03:51:38 2007
@@ -139,10 +139,6 @@
     java.lang.ArithmeticException. The fix is to initialize bytesPerChecksum
     to 0.  (Michael Bieniosek via ddas)
 
-    HADOOP-2245.  Fix LocalJobRunner to generate unique mapids across jobs by
-    incorporating the jobid. Also adds a test-case for JobControl vis-a-vis the 
-    LocalJobRunner. (Adrian Woodhead via acmurthy)
-
     HADOOP-2216.  Fix jobtasks.jsp to ensure that it first collects the
     taskids which satisfy the filtering criteria and then use that list to
     print out only the required task-reports, previously it was oblivious to

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java?rev=597649&r1=597648&r2=597649&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java Fri Nov 23 03:51:38
2007
@@ -114,7 +114,7 @@
         }
         DataOutputBuffer buffer = new DataOutputBuffer();
         for (int i = 0; i < splits.length; i++) {
-          String mapId = jobId + "_map_" + idFormat.format(i);
+          String mapId = "map_" + idFormat.format(i); 
           mapIds.add(mapId);
           buffer.reset();
           splits[i].write(buffer);

Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java?rev=597649&r1=597648&r2=597649&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/TestJobControl.java Fri
Nov 23 03:51:38 2007
@@ -139,9 +139,11 @@
    * Then it creates a JobControl object and add the 4 jobs to the JobControl object.
    * Finally, it creates a thread to run the JobControl object and monitors/reports
    * the job states.
+   * 
+   * @param args
    */
   public static void doJobControlTest() throws Exception {
-
+        
     Configuration defaults = new Configuration();
     FileSystem fs = FileSystem.get(defaults);
     Path rootDataDir = new Path(System.getProperty("test.build.data", "."), "TestJobControlData");
@@ -151,29 +153,29 @@
     Path outdir_3 = new Path(rootDataDir, "outdir_3");
     Path outdir_4 = new Path(rootDataDir, "outdir_4");
 
-    JobControlTestUtils.cleanData(fs, indir);
-    JobControlTestUtils.generateData(fs, indir);
+    cleanData(fs, indir);
+    generateData(fs, indir);
 
-    JobControlTestUtils.cleanData(fs, outdir_1);
-    JobControlTestUtils.cleanData(fs, outdir_2);
-    JobControlTestUtils.cleanData(fs, outdir_3);
-    JobControlTestUtils.cleanData(fs, outdir_4);
+    cleanData(fs, outdir_1);
+    cleanData(fs, outdir_2);
+    cleanData(fs, outdir_3);
+    cleanData(fs, outdir_4);
 
     ArrayList<Job> dependingJobs = null;
 
     ArrayList<Path> inPaths_1 = new ArrayList<Path>();
     inPaths_1.add(indir);
-    JobConf jobConf_1 = JobControlTestUtils.createCopyJob(inPaths_1, outdir_1);
+    JobConf jobConf_1 = createCopyJob(inPaths_1, outdir_1);
     Job job_1 = new Job(jobConf_1, dependingJobs);
     ArrayList<Path> inPaths_2 = new ArrayList<Path>();
     inPaths_2.add(indir);
-    JobConf jobConf_2 = JobControlTestUtils.createCopyJob(inPaths_2, outdir_2);
+    JobConf jobConf_2 = createCopyJob(inPaths_2, outdir_2);
     Job job_2 = new Job(jobConf_2, dependingJobs);
 
     ArrayList<Path> inPaths_3 = new ArrayList<Path>();
     inPaths_3.add(outdir_1);
     inPaths_3.add(outdir_2);
-    JobConf jobConf_3 = JobControlTestUtils.createCopyJob(inPaths_3, outdir_3);
+    JobConf jobConf_3 = createCopyJob(inPaths_3, outdir_3);
     dependingJobs = new ArrayList<Job>();
     dependingJobs.add(job_1);
     dependingJobs.add(job_2);
@@ -181,7 +183,7 @@
 
     ArrayList<Path> inPaths_4 = new ArrayList<Path>();
     inPaths_4.add(outdir_3);
-    JobConf jobConf_4 = JobControlTestUtils.createCopyJob(inPaths_4, outdir_4);
+    JobConf jobConf_4 = createCopyJob(inPaths_4, outdir_4);
     dependingJobs = new ArrayList<Job>();
     dependingJobs.add(job_3);
     Job job_4 = new Job(jobConf_4, dependingJobs);



Mime
View raw message