public class AvroOutputFormat<E> extends FileOutputFormat<E> implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
AvroOutputFormat.Codec
Wrapper which encapsulates the supported codec and a related serialization byte.
|
FileOutputFormat.OutputDirectoryModeFILE_PARAMETER_KEY, outputFilePath, stream| Constructor and Description |
|---|
AvroOutputFormat(Class<E> type) |
AvroOutputFormat(Path filePath,
Class<E> type) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected String |
getDirectoryFileName(int taskNumber) |
void |
open(int taskNumber,
int numTasks) |
void |
setCodec(AvroOutputFormat.Codec codec)
Set avro codec for compression.
|
void |
setSchema(org.apache.avro.Schema schema) |
void |
writeRecord(E record) |
configure, getOutputDirectoryMode, getOutputFilePath, getWriteMode, initializeGlobal, setOutputDirectoryMode, setOutputFilePath, setWriteMode, tryCleanupOnErrorgetRuntimeContext, setRuntimeContextprotected String getDirectoryFileName(int taskNumber)
getDirectoryFileName in class FileOutputFormat<E>public void setSchema(org.apache.avro.Schema schema)
public void setCodec(AvroOutputFormat.Codec codec)
codec - avro codec.public void writeRecord(E record) throws IOException
writeRecord in interface OutputFormat<E>IOExceptionpublic void open(int taskNumber,
int numTasks)
throws IOException
open in interface OutputFormat<E>open in class FileOutputFormat<E>IOExceptionpublic void close()
throws IOException
close in interface OutputFormat<E>close in class FileOutputFormat<E>IOExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.