public class AvroTrevniOutputFormat<T> extends org.apache.hadoop.mapred.FileOutputFormat<AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
OutputFormat
that writes Avro data to
Trevni files.
Writes a directory of files per task, each comprising a single filesystem block. To reduce the number of files, increase the default filesystem block size for the job. Each task also requires enough memory to buffer a filesystem block.
Modifier and Type | Field and Description |
---|---|
static String |
EXT
The file name extension for trevni files.
|
static String |
META_PREFIX |
Constructor and Description |
---|
AvroTrevniOutputFormat() |
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 |
setMeta(org.apache.hadoop.mapred.JobConf job,
String key,
String value)
Add metadata to job output files.
|
public static final String EXT
public static final String META_PREFIX
public static void setMeta(org.apache.hadoop.mapred.JobConf job, String key, String value)
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.