public class AvroOutputFormat<T> extends FileOutputFormat<AvroWrapper<T>,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.FileOutputFormat.Counter
Modifier and Type | Field and Description |
---|---|
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.
|
static String |
XZ_LEVEL_KEY
The configuration key for Avro XZ level.
|
Constructor and Description |
---|
AvroOutputFormat() |
Modifier and Type | Method and Description |
---|---|
RecordWriter<AvroWrapper<T>,NullWritable> |
getRecordWriter(FileSystem ignore,
JobConf job,
String name,
Progressable prog) |
static void |
setDeflateLevel(JobConf job,
int level)
Enable output compression using the deflate codec and specify its level.
|
static void |
setSyncInterval(JobConf job,
int syncIntervalInBytes)
Set the sync interval to be used by the underlying
DataFileWriter . |
checkOutputSpecs, getCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath
public static final String EXT
public static final String DEFLATE_LEVEL_KEY
public static final String XZ_LEVEL_KEY
public static final String SYNC_INTERVAL_KEY
public static void setDeflateLevel(JobConf job, int level)
public static void setSyncInterval(JobConf job, int syncIntervalInBytes)
DataFileWriter
.public RecordWriter<AvroWrapper<T>,NullWritable> getRecordWriter(FileSystem ignore, JobConf job, String name, Progressable prog) throws IOException
getRecordWriter
in interface OutputFormat<AvroWrapper<T>,NullWritable>
getRecordWriter
in class FileOutputFormat<AvroWrapper<T>,NullWritable>
IOException
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.