@Internal public abstract class AbstractAvroBulkFormat<A,T,SplitT extends FileSourceSplit> extends Object implements BulkFormat<T,SplitT>
BulkFormat
for Avro records.BulkFormat.Reader<T>, BulkFormat.RecordIterator<T>
Modifier and Type | Field and Description |
---|---|
protected org.apache.avro.Schema |
readerSchema |
Modifier | Constructor and Description |
---|---|
protected |
AbstractAvroBulkFormat(org.apache.avro.Schema readerSchema) |
Modifier and Type | Method and Description |
---|---|
protected abstract Function<A,T> |
createConverter() |
org.apache.flink.formats.avro.AbstractAvroBulkFormat.AvroReader |
createReader(Configuration config,
SplitT split)
Creates a new reader that reads from the
split's path starting
at the split's offset and reads length bytes after the offset. |
protected abstract A |
createReusedAvroRecord() |
boolean |
isSplittable()
Checks whether this format is splittable.
|
org.apache.flink.formats.avro.AbstractAvroBulkFormat.AvroReader |
restoreReader(Configuration config,
SplitT split)
Creates a new reader that reads from
split.path() starting at offset and
reads until length bytes after the offset. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProducedType
protected AbstractAvroBulkFormat(org.apache.avro.Schema readerSchema)
public org.apache.flink.formats.avro.AbstractAvroBulkFormat.AvroReader createReader(Configuration config, SplitT split) throws IOException
BulkFormat
split's path
starting
at the split's offset
and reads length
bytes after the offset.createReader
in interface BulkFormat<T,SplitT extends FileSourceSplit>
IOException
public org.apache.flink.formats.avro.AbstractAvroBulkFormat.AvroReader restoreReader(Configuration config, SplitT split) throws IOException
BulkFormat
split.path()
starting at offset
and
reads until length
bytes after the offset. A number of recordsToSkip
records
should be read and discarded after the offset. This is typically part of restoring a reader
to a checkpointed position.restoreReader
in interface BulkFormat<T,SplitT extends FileSourceSplit>
IOException
public boolean isSplittable()
BulkFormat
See top-level JavaDocs
(section "Splitting") for details.
isSplittable
in interface BulkFormat<T,SplitT extends FileSourceSplit>
protected abstract A createReusedAvroRecord()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.