@Internal public final class StreamFormatAdapter<T> extends Object implements BulkFormat<T,FileSourceSplit>
StreamFormat into a BulkFormat.| Modifier and Type | Class and Description |
|---|---|
static class |
StreamFormatAdapter.Reader<T>
The reader adapter, from
StreamFormat.Reader to BulkFormat.Reader. |
BulkFormat.RecordIterator<T>| Constructor and Description |
|---|
StreamFormatAdapter(StreamFormat<T> streamFormat) |
| Modifier and Type | Method and Description |
|---|---|
BulkFormat.Reader<T> |
createReader(org.apache.flink.configuration.Configuration config,
FileSourceSplit 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. |
org.apache.flink.api.common.typeinfo.TypeInformation<T> |
getProducedType()
Gets the type produced by this format.
|
boolean |
isSplittable()
Checks whether this format is splittable.
|
BulkFormat.Reader<T> |
restoreReader(org.apache.flink.configuration.Configuration config,
FileSourceSplit split)
Creates a new reader that reads from
split.path() starting at offset and
reads until length bytes after the offset. |
public StreamFormatAdapter(StreamFormat<T> streamFormat)
public BulkFormat.Reader<T> createReader(org.apache.flink.configuration.Configuration config, FileSourceSplit split) throws IOException
BulkFormatsplit's path starting
at the split's offset and reads length bytes after the offset.createReader in interface BulkFormat<T,FileSourceSplit>IOExceptionpublic BulkFormat.Reader<T> restoreReader(org.apache.flink.configuration.Configuration config, FileSourceSplit split) throws IOException
BulkFormatsplit.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,FileSourceSplit>IOExceptionpublic boolean isSplittable()
BulkFormatSee top-level JavaDocs (section "Splitting") for details.
isSplittable in interface BulkFormat<T,FileSourceSplit>public org.apache.flink.api.common.typeinfo.TypeInformation<T> getProducedType()
BulkFormatgetProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>getProducedType in interface BulkFormat<T,FileSourceSplit>Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.