public class AvroInputFormat<E>
extends org.apache.flink.api.common.io.FileInputFormat<E>
implements org.apache.flink.api.java.typeutils.ResultTypeQueryable<E>
| Constructor and Description |
|---|
AvroInputFormat(org.apache.flink.core.fs.Path filePath,
Class<E> type) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.api.common.typeinfo.TypeInformation<E> |
getProducedType() |
E |
nextRecord(E reuseValue) |
void |
open(org.apache.flink.core.fs.FileInputSplit split) |
boolean |
reachedEnd() |
void |
setReuseAvroValue(boolean reuseAvroValue)
Sets the flag whether to reuse the Avro value instance for all records.
|
void |
setUnsplittable(boolean unsplittable)
If set, the InputFormat will only read entire files.
|
acceptFile, close, configure, createInputSplits, decorateInputStream, extractFileExtension, getFilePath, getFileStats, getInflaterInputStreamFactory, getInputSplitAssigner, getMinSplitSize, getNumSplits, getOpenTimeout, getSplitLength, getSplitStart, getStatistics, registerInflaterInputStreamFactory, setFilePath, setFilePath, setMinSplitSize, setNumSplits, setOpenTimeout, testForUnsplittable, toStringpublic void setReuseAvroValue(boolean reuseAvroValue)
reuseAvroValue - True, if the input format should reuse the Avro value instance, false otherwise.public void setUnsplittable(boolean unsplittable)
public org.apache.flink.api.common.typeinfo.TypeInformation<E> getProducedType()
getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<E>public void open(org.apache.flink.core.fs.FileInputSplit split)
throws IOException
open in interface org.apache.flink.api.common.io.InputFormat<E,org.apache.flink.core.fs.FileInputSplit>open in class org.apache.flink.api.common.io.FileInputFormat<E>IOExceptionpublic boolean reachedEnd()
throws IOException
reachedEnd in interface org.apache.flink.api.common.io.InputFormat<E,org.apache.flink.core.fs.FileInputSplit>IOExceptionpublic E nextRecord(E reuseValue) throws IOException
nextRecord in interface org.apache.flink.api.common.io.InputFormat<E,org.apache.flink.core.fs.FileInputSplit>IOExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.