public class AvroOutputFormat<T> extends org.apache.hadoop.mapred.FileOutputFormat<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
OutputFormat
for Avro data files.
You can specify various options using Job Configuration properties.
Look at the fields in AvroJob
as well as this class to get
an overview of the supported options.Modifier and Type | Field and Description |
---|---|
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.
|
static String |
SYNC_INTERVAL_KEY
The configuration key for Avro sync interval.
|
Constructor and Description |
---|
AvroOutputFormat() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.mapred.RecordWriter<AvroWrapper<T>,org.apache.hadoop.io.NullWritable> |
getRecordWriter(org.apache.hadoop.fs.FileSystem ignore,
org.apache.hadoop.mapred.JobConf job,
String name,
org.apache.hadoop.util.Progressable prog) |
static void |
setDeflateLevel(org.apache.hadoop.mapred.JobConf job,
int level)
Enable output compression using the deflate codec and specify its level.
|
static void |
setSyncInterval(org.apache.hadoop.mapred.JobConf job,
int syncIntervalInBytes)
Set the sync interval to be used by the underlying
DataFileWriter . |
public static final String EXT
public static final String DEFLATE_LEVEL_KEY
public static final String SYNC_INTERVAL_KEY
public static final int DEFAULT_DEFLATE_LEVEL
public static void setDeflateLevel(org.apache.hadoop.mapred.JobConf job, int level)
public static void setSyncInterval(org.apache.hadoop.mapred.JobConf job, int syncIntervalInBytes)
DataFileWriter
.public org.apache.hadoop.mapred.RecordWriter<AvroWrapper<T>,org.apache.hadoop.io.NullWritable> getRecordWriter(org.apache.hadoop.fs.FileSystem ignore, org.apache.hadoop.mapred.JobConf job, String name, org.apache.hadoop.util.Progressable prog) throws IOException
getRecordWriter
in interface org.apache.hadoop.mapred.OutputFormat<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
getRecordWriter
in class org.apache.hadoop.mapred.FileOutputFormat<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
IOException
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.