public class AvroOutputFormat<E> extends org.apache.flink.api.common.io.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.
|
| Constructor and Description |
|---|
AvroOutputFormat(Class<E> type) |
AvroOutputFormat(org.apache.flink.core.fs.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, tryCleanupOnErrorprotected String getDirectoryFileName(int taskNumber)
getDirectoryFileName in class org.apache.flink.api.common.io.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 org.apache.flink.api.common.io.OutputFormat<E>IOExceptionpublic void open(int taskNumber,
int numTasks)
throws IOException
open in interface org.apache.flink.api.common.io.OutputFormat<E>open in class org.apache.flink.api.common.io.FileOutputFormat<E>IOExceptionpublic void close()
throws IOException
close in interface org.apache.flink.api.common.io.OutputFormat<E>close in class org.apache.flink.api.common.io.FileOutputFormat<E>IOExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.