org.apache.avro.mapred
Class AvroOutputFormat<T>

java.lang.Object
  extended by org.apache.hadoop.mapred.FileOutputFormat<AvroWrapper<T>,NullWritable>
      extended by org.apache.avro.mapred.AvroOutputFormat<T>
All Implemented Interfaces:
org.apache.hadoop.mapred.OutputFormat<AvroWrapper<T>,NullWritable>

public class AvroOutputFormat<T>
extends org.apache.hadoop.mapred.FileOutputFormat<AvroWrapper<T>,NullWritable>

An OutputFormat for Avro data files.


Field Summary
static int DEFAULT_DEFLATE_LEVEL
          The default deflate level.
static String DEFLATE_LEVEL_KEY
          The configuration key for Avro deflate level.
static String EXT
          The file name extension for avro data files.
 
Constructor Summary
AvroOutputFormat()
           
 
Method Summary
 org.apache.hadoop.mapred.RecordWriter<AvroWrapper<T>,NullWritable> getRecordWriter(FileSystem ignore, org.apache.hadoop.mapred.JobConf job, String name, Progressable prog)
           
static void setDeflateLevel(org.apache.hadoop.mapred.JobConf job, int level)
          Enable output compression using the deflate codec and specify its level.
 
Methods inherited from class org.apache.hadoop.mapred.FileOutputFormat
checkOutputSpecs, getCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXT

public static final String EXT
The file name extension for avro data files.

See Also:
Constant Field Values

DEFLATE_LEVEL_KEY

public static final String DEFLATE_LEVEL_KEY
The configuration key for Avro deflate level.

See Also:
Constant Field Values

DEFAULT_DEFLATE_LEVEL

public static final int DEFAULT_DEFLATE_LEVEL
The default deflate level.

See Also:
Constant Field Values
Constructor Detail

AvroOutputFormat

public AvroOutputFormat()
Method Detail

setDeflateLevel

public static void setDeflateLevel(org.apache.hadoop.mapred.JobConf job,
                                   int level)
Enable output compression using the deflate codec and specify its level.


getRecordWriter

public org.apache.hadoop.mapred.RecordWriter<AvroWrapper<T>,NullWritable> getRecordWriter(FileSystem ignore,
                                                                                          org.apache.hadoop.mapred.JobConf job,
                                                                                          String name,
                                                                                          Progressable prog)
                                                                                   throws IOException
Specified by:
getRecordWriter in interface org.apache.hadoop.mapred.OutputFormat<AvroWrapper<T>,NullWritable>
Specified by:
getRecordWriter in class org.apache.hadoop.mapred.FileOutputFormat<AvroWrapper<T>,NullWritable>
Throws:
IOException


Copyright © 2010 The Apache Software Foundation