Package org.apache.trevni.avro
Class AvroTrevniOutputFormat<T>
java.lang.Object
org.apache.hadoop.mapred.FileOutputFormat<AvroWrapper<T>,NullWritable>
org.apache.trevni.avro.AvroTrevniOutputFormat<T>
- All Implemented Interfaces:
OutputFormat<AvroWrapper<T>,
NullWritable>
An
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.mapred.FileOutputFormat
FileOutputFormat.Counter
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRecordWriter
(FileSystem ignore, JobConf job, String name, Progressable prog) static void
Add metadata to job output files.Methods inherited from class org.apache.hadoop.mapred.FileOutputFormat
checkOutputSpecs, getCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath, setWorkOutputPath
-
Field Details
-
EXT
The file name extension for trevni files.- See Also:
-
META_PREFIX
- See Also:
-
-
Constructor Details
-
AvroTrevniOutputFormat
public AvroTrevniOutputFormat()
-
-
Method Details
-
setMeta
Add metadata to job output files. -
getRecordWriter
public RecordWriter<AvroWrapper<T>,NullWritable> getRecordWriter(FileSystem ignore, JobConf job, String name, Progressable prog) throws IOException - Specified by:
getRecordWriter
in interfaceOutputFormat<AvroWrapper<T>,
NullWritable> - Specified by:
getRecordWriter
in classFileOutputFormat<AvroWrapper<T>,
NullWritable> - Throws:
IOException
-