hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject svn commit: r644868 [2/2] - in /hadoop/core/trunk: ./ src/contrib/data_join/src/java/org/apache/hadoop/contrib/utils/join/ src/contrib/index/src/java/org/apache/hadoop/contrib/index/main/ src/contrib/index/src/java/org/apache/hadoop/contrib/index/mapre...
Date Fri, 04 Apr 2008 19:59:23 GMT
Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSpecialCharactersInOutputPath.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSpecialCharactersInOutputPath.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSpecialCharactersInOutputPath.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSpecialCharactersInOutputPath.java
Fri Apr  4 12:59:14 2008
@@ -75,7 +75,7 @@
     conf.setMapperClass(IdentityMapper.class);        
     conf.setReducerClass(IdentityReducer.class);
     conf.setInputPath(inDir);
-    conf.setOutputPath(outDir);
+    FileOutputFormat.setOutputPath(conf, outDir);
     conf.setNumMapTasks(numMaps);
     conf.setNumReduceTasks(numReduces);
       
@@ -123,9 +123,10 @@
   }
 
   /** generates output filenames with special characters */
-  static class SpecialTextOutputFormat extends TextOutputFormat {
+  static class SpecialTextOutputFormat<K,V> extends TextOutputFormat<K,V> {
     @Override
-    public RecordWriter getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable
progress) throws IOException {
+    public RecordWriter<K,V> getRecordWriter(FileSystem ignored, JobConf job,
+             String name, Progressable progress) throws IOException {
         return super.getRecordWriter(ignored, job, OUTPUT_FILENAME, progress);
     }
   }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestTextOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestTextOutputFormat.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestTextOutputFormat.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestTextOutputFormat.java Fri Apr
 4 12:59:14 2008
@@ -43,7 +43,7 @@
   @SuppressWarnings("unchecked")
   public void testFormat() throws Exception {
     JobConf job = new JobConf();
-    job.setOutputPath(workDir);
+    FileOutputFormat.setWorkOutputPath(job, workDir);
     FileSystem fs = workDir.getFileSystem(job);
     if (!fs.mkdirs(workDir)) {
       fail("Failed to create output directory");

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/ThreadedMapBenchmark.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/ThreadedMapBenchmark.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/ThreadedMapBenchmark.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/ThreadedMapBenchmark.java Fri Apr
 4 12:59:14 2008
@@ -78,7 +78,7 @@
     public InputSplit[] getSplits(JobConf job, 
                                   int numSplits) throws IOException {
       InputSplit[] result = new InputSplit[numSplits];
-      Path outDir = job.getOutputPath();
+      Path outDir = FileOutputFormat.getOutputPath(job);
       for(int i=0; i < result.length; ++i) {
         result[i] = new FileSplit(new Path(outDir, "dummy-split-" + i),
                                   0, 1, (String[])null);
@@ -215,7 +215,7 @@
             String.valueOf(dataSizePerMap * 1024 * 1024));
     job.setNumReduceTasks(0); // none reduce
     job.setNumMapTasks(numMapsPerHost * cluster.getTaskTrackers());
-    job.setOutputPath(INPUT_DIR);
+    FileOutputFormat.setOutputPath(job, INPUT_DIR);
     
     FileSystem fs = FileSystem.get(job);
     fs.delete(BASE_DIR, true);
@@ -296,7 +296,7 @@
       job.setReducerClass(IdentityReducer.class);
       
       job.addInputPath(INPUT_DIR);
-      job.setOutputPath(OUTPUT_DIR);
+      FileOutputFormat.setOutputPath(job, OUTPUT_DIR);
       
       JobClient client = new JobClient(job);
       ClusterStatus cluster = client.getClusterStatus();

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/JobControlTestUtils.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/JobControlTestUtils.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/JobControlTestUtils.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/JobControlTestUtils.java
Fri Apr  4 12:59:14 2008
@@ -30,6 +30,7 @@
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
+import org.apache.hadoop.mapred.FileOutputFormat;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.MapReduceBase;
 import org.apache.hadoop.mapred.Mapper;
@@ -124,7 +125,7 @@
       }
     }
     theJob.setMapperClass(DataCopy.class);
-    theJob.setOutputPath(outdir);
+    FileOutputFormat.setOutputPath(theJob, outdir);
     theJob.setOutputKeyClass(Text.class);
     theJob.setOutputValueClass(Text.class);
     theJob.setReducerClass(DataCopy.class);

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/join/TestDatamerge.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/join/TestDatamerge.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/join/TestDatamerge.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/join/TestDatamerge.java Fri Apr  4
12:59:14 2008
@@ -32,6 +32,7 @@
 import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.mapred.FileOutputFormat;
 import org.apache.hadoop.mapred.JobClient;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.Mapper;
@@ -221,7 +222,7 @@
         SequenceFileInputFormat.class, src));
     job.setInt("testdatamerge.sources", srcs);
     job.setInputFormat(CompositeInputFormat.class);
-    job.setOutputPath(new Path(base, "out"));
+    FileOutputFormat.setOutputPath(job, new Path(base, "out"));
 
     job.setMapperClass(c);
     job.setReducerClass(c);

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/TestMultithreadedMapRunner.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/TestMultithreadedMapRunner.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/TestMultithreadedMapRunner.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/TestMultithreadedMapRunner.java
Fri Apr  4 12:59:14 2008
@@ -88,7 +88,7 @@
     conf.setReducerClass(IDReduce.class);
 
     conf.setInputPath(inDir);
-    conf.setOutputPath(outDir);
+    FileOutputFormat.setOutputPath(conf, outDir);
 
     conf.setMapRunnerClass(MultithreadedMapRunner.class);
     

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/aggregate/TestAggregates.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/aggregate/TestAggregates.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/aggregate/TestAggregates.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/aggregate/TestAggregates.java
Fri Apr  4 12:59:14 2008
@@ -81,7 +81,7 @@
     job.setInputPath(INPUT_DIR);
     job.setInputFormat(TextInputFormat.class);
 
-    job.setOutputPath(OUTPUT_DIR);
+    FileOutputFormat.setOutputPath(job, OUTPUT_DIR);
     job.setOutputFormat(TextOutputFormat.class);
     job.setMapOutputKeyClass(Text.class);
     job.setMapOutputValueClass(Text.class);

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/pipes/TestPipes.java Fri Apr  4 12:59:14
2008
@@ -30,6 +30,7 @@
 import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.mapred.FileOutputFormat;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.MiniMRCluster;
 import org.apache.hadoop.mapred.OutputLogFilter;
@@ -146,7 +147,7 @@
       Submitter.setIsJavaRecordReader(job, true);
       Submitter.setIsJavaRecordWriter(job, true);
       job.setInputPath(inputPath);
-      job.setOutputPath(outputPath);
+      FileOutputFormat.setOutputPath(job, outputPath);
       RunningJob result = Submitter.submitJob(job);
       assertTrue("pipes job failed", result.isSuccessful());
     }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordMR.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordMR.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordMR.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordMR.java Fri Apr  4 12:59:14
2008
@@ -312,7 +312,7 @@
     genJob.setInputFormat(SequenceFileInputFormat.class);
     genJob.setMapperClass(RandomGenMapper.class);
 
-    genJob.setOutputPath(randomOuts);
+    FileOutputFormat.setOutputPath(genJob, randomOuts);
     genJob.setOutputKeyClass(RecInt.class);
     genJob.setOutputValueClass(RecString.class);
     genJob.setOutputFormat(SequenceFileOutputFormat.class);
@@ -357,7 +357,7 @@
     checkJob.setInputFormat(SequenceFileInputFormat.class);
     checkJob.setMapperClass(RandomCheckMapper.class);
 
-    checkJob.setOutputPath(intermediateOuts);
+    FileOutputFormat.setOutputPath(checkJob, intermediateOuts);
     checkJob.setOutputKeyClass(RecInt.class);
     checkJob.setOutputValueClass(RecString.class);
     checkJob.setOutputFormat(SequenceFileOutputFormat.class);
@@ -380,7 +380,7 @@
     mergeJob.setInputFormat(SequenceFileInputFormat.class);
     mergeJob.setMapperClass(MergeMapper.class);
         
-    mergeJob.setOutputPath(finalOuts);
+    FileOutputFormat.setOutputPath(mergeJob, finalOuts);
     mergeJob.setOutputKeyClass(RecInt.class);
     mergeJob.setOutputValueClass(RecInt.class);
     mergeJob.setOutputFormat(SequenceFileOutputFormat.class);

Modified: hadoop/core/trunk/src/test/testshell/ExternalMapReduce.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/testshell/ExternalMapReduce.java?rev=644868&r1=644867&r2=644868&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/testshell/ExternalMapReduce.java (original)
+++ hadoop/core/trunk/src/test/testshell/ExternalMapReduce.java Fri Apr  4 12:59:14 2008
@@ -25,9 +25,9 @@
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.IntWritable;
-import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableComparable;
+import org.apache.hadoop.mapred.FileOutputFormat;
 import org.apache.hadoop.mapred.JobClient;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.Mapper;
@@ -88,7 +88,7 @@
     JobConf testConf = new JobConf(commandConf, ExternalMapReduce.class);
     testConf.setJobName("external job");
     testConf.setInputPath(input);
-    testConf.setOutputPath(outDir);
+    FileOutputFormat.setOutputPath(testConf, outDir);
     testConf.setMapperClass(ExternalMapReduce.class);
     testConf.setReducerClass(ExternalMapReduce.class);
     testConf.setNumReduceTasks(1);



Mime
View raw message