hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r808730 - in /hadoop/mapreduce/trunk: ./ src/java/org/apache/hadoop/mapred/lib/ src/java/org/apache/hadoop/mapreduce/lib/output/ src/test/mapred/org/apache/hadoop/mapreduce/lib/output/
Date Fri, 28 Aug 2009 02:06:51 GMT
Author: cdouglas
Date: Fri Aug 28 02:06:51 2009
New Revision: 808730

URL: http://svn.apache.org/viewvc?rev=808730&view=rev
Log:
Revert MAPREDUCE-370

Removed:
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/MultipleOutputs.java
    hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapreduce/lib/output/TestMRMultipleOutputs.java
Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputFormat.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputs.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleSequenceFileOutputFormat.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleTextOutputFormat.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/MapFileOutputFormat.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileAsBinaryOutputFormat.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileOutputFormat.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/TextOutputFormat.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Fri Aug 28 02:06:51 2009
@@ -266,10 +266,6 @@
     MAPREDUCE-476. Extend DistributedCache to work locally (LocalJobRunner).
     (Philip Zeyliger via tomwhite)
 
-    MAPREDUCE-370. Change org.apache.hadoop.mapred.lib.MultipleOutputs
-    and org.apache.hadoop.mapred.lib.MultipleOutputFormat to use new api.
-    (Amareshwari Sriramadasu via sharad)
-
     MAPREDUCE-750. Extensible ConnManager factory API. (Aaron Kimball via
     tomwhite)
 

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputFormat.java?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputFormat.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputFormat.java
Fri Aug 28 02:06:51 2009
@@ -47,10 +47,7 @@
  * Case three: This class is used for a map only job. The job wants to use an
  * output file name that depends on both the keys and the input file name,
  * 
- * @deprecated Use 
- * {@link org.apache.hadoop.mapreduce.lib.output.MultipleOutputs} instead
  */
-@Deprecated
 public abstract class MultipleOutputFormat<K, V>
 extends FileOutputFormat<K, V> {
 

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputs.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputs.java?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputs.java (original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleOutputs.java Fri
Aug 28 02:06:51 2009
@@ -112,10 +112,7 @@
  *
  * }
  * </pre>
- * @deprecated Use 
- * {@link org.apache.hadoop.mapreduce.lib.output.MultipleOutputs} instead
  */
-@Deprecated
 public class MultipleOutputs {
 
   private static final String NAMED_OUTPUTS = "mo.namedOutputs";

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleSequenceFileOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleSequenceFileOutputFormat.java?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleSequenceFileOutputFormat.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleSequenceFileOutputFormat.java
Fri Aug 28 02:06:51 2009
@@ -29,10 +29,7 @@
 /**
  * This class extends the MultipleOutputFormat, allowing to write the output data 
  * to different output files in sequence file output format. 
- * @deprecated Use 
- * {@link org.apache.hadoop.mapreduce.lib.output.MultipleOutputs} instead
  */
-@Deprecated
 public class MultipleSequenceFileOutputFormat <K,V>
 extends MultipleOutputFormat<K, V> {
 

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleTextOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleTextOutputFormat.java?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleTextOutputFormat.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/lib/MultipleTextOutputFormat.java
Fri Aug 28 02:06:51 2009
@@ -29,10 +29,7 @@
 /**
  * This class extends the MultipleOutputFormat, allowing to write the output
  * data to different output files in Text output format.
- * @deprecated Use 
- * {@link org.apache.hadoop.mapreduce.lib.output.MultipleOutputs} instead
  */
-@Deprecated
 public class MultipleTextOutputFormat<K, V>
     extends MultipleOutputFormat<K, V> {
 

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.java?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.java
Fri Aug 28 02:06:51 2009
@@ -42,7 +42,6 @@
   /** Construct output file names so that, when an output directory listing is
    * sorted lexicographically, positions correspond to output partitions.*/
   private static final NumberFormat NUMBER_FORMAT = NumberFormat.getInstance();
-  protected static final String PART = "part";
   static {
     NUMBER_FORMAT.setMinimumIntegerDigits(5);
     NUMBER_FORMAT.setGroupingUsed(false);
@@ -109,14 +108,10 @@
     return codecClass;
   }
   
-  public RecordWriter<K, V> getRecordWriter(TaskAttemptContext job
-                     ) throws IOException, InterruptedException {
-    return getRecordWriter(job, PART);
-  }
+  public abstract RecordWriter<K, V> 
+     getRecordWriter(TaskAttemptContext job
+                     ) throws IOException, InterruptedException;
 
-  public abstract RecordWriter<K, V> getRecordWriter(TaskAttemptContext job,
-      String name) throws IOException, InterruptedException;
- 
   public void checkOutputSpecs(JobContext job
                                ) throws FileAlreadyExistsException, IOException{
     // Ensure that the output directory is set and not already there
@@ -255,11 +250,10 @@
    * @throws IOException
    */
   public Path getDefaultWorkFile(TaskAttemptContext context,
-                                 String name,
                                  String extension) throws IOException{
     FileOutputCommitter committer = 
       (FileOutputCommitter) getOutputCommitter(context);
-    return new Path(committer.getWorkPath(), getUniqueFile(context, name, 
+    return new Path(committer.getWorkPath(), getUniqueFile(context, "part", 
                                                            extension));
   }
 

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/MapFileOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/MapFileOutputFormat.java?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/MapFileOutputFormat.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/MapFileOutputFormat.java
Fri Aug 28 02:06:51 2009
@@ -45,7 +45,7 @@
     extends FileOutputFormat<WritableComparable<?>, Writable> {
 
   public RecordWriter<WritableComparable<?>, Writable> getRecordWriter(
-      TaskAttemptContext context, String name) throws IOException {
+      TaskAttemptContext context) throws IOException {
     Configuration conf = context.getConfiguration();
     CompressionCodec codec = null;
     CompressionType compressionType = CompressionType.NONE;
@@ -59,7 +59,7 @@
       codec = (CompressionCodec) ReflectionUtils.newInstance(codecClass, conf);
     }
 
-    Path file = getDefaultWorkFile(context, name, "");
+    Path file = getDefaultWorkFile(context, "");
     FileSystem fs = file.getFileSystem(conf);
     // ignore the progress parameter, since MapFile is local
     final MapFile.Writer out =

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileAsBinaryOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileAsBinaryOutputFormat.java?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileAsBinaryOutputFormat.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileAsBinaryOutputFormat.java
Fri Aug 28 02:06:51 2009
@@ -127,10 +127,10 @@
   
   @Override 
   public RecordWriter<BytesWritable, BytesWritable> getRecordWriter(
-      TaskAttemptContext context, String name) throws IOException {
+      TaskAttemptContext context) throws IOException {
     final SequenceFile.Writer out = getSequenceWriter(context,
       getSequenceFileOutputKeyClass(context),
-      getSequenceFileOutputValueClass(context), name); 
+      getSequenceFileOutputValueClass(context)); 
 
     return new RecordWriter<BytesWritable, BytesWritable>() {
       private WritableValueBytes wvaluebytes = new WritableValueBytes();

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileOutputFormat.java?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileOutputFormat.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/SequenceFileOutputFormat.java
Fri Aug 28 02:06:51 2009
@@ -39,7 +39,7 @@
 public class SequenceFileOutputFormat <K,V> extends FileOutputFormat<K, V> {
 
   protected SequenceFile.Writer getSequenceWriter(TaskAttemptContext context,
-      Class<?> keyClass, Class<?> valueClass, String name) 
+      Class<?> keyClass, Class<?> valueClass) 
       throws IOException {
     Configuration conf = context.getConfiguration();
 	    
@@ -55,7 +55,7 @@
         ReflectionUtils.newInstance(codecClass, conf);
     }
     // get the path of the temporary output file 
-    Path file = getDefaultWorkFile(context, name, "");
+    Path file = getDefaultWorkFile(context, "");
     FileSystem fs = file.getFileSystem(conf);
     return SequenceFile.createWriter(fs, conf, file,
              keyClass,
@@ -66,10 +66,10 @@
   }
   
   public RecordWriter<K, V> 
-         getRecordWriter(TaskAttemptContext context, String name
+         getRecordWriter(TaskAttemptContext context
                          ) throws IOException, InterruptedException {
     final SequenceFile.Writer out = getSequenceWriter(context,
-      context.getOutputKeyClass(), context.getOutputValueClass(), name);
+      context.getOutputKeyClass(), context.getOutputValueClass());
 
     return new RecordWriter<K, V>() {
 

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/TextOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/TextOutputFormat.java?rev=808730&r1=808729&r2=808730&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/TextOutputFormat.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/lib/output/TextOutputFormat.java
Fri Aug 28 02:06:51 2009
@@ -108,7 +108,7 @@
   }
 
   public RecordWriter<K, V> 
-         getRecordWriter(TaskAttemptContext job, String name
+         getRecordWriter(TaskAttemptContext job
                          ) throws IOException, InterruptedException {
     Configuration conf = job.getConfiguration();
     boolean isCompressed = getCompressOutput(job);
@@ -122,7 +122,7 @@
       codec = (CompressionCodec) ReflectionUtils.newInstance(codecClass, conf);
       extension = codec.getDefaultExtension();
     }
-    Path file = getDefaultWorkFile(job, name, extension);
+    Path file = getDefaultWorkFile(job, extension);
     FileSystem fs = file.getFileSystem(conf);
     if (!isCompressed) {
       FSDataOutputStream fileOut = fs.create(file, false);



Mime
View raw message