Class DeserializationSchemaAdapter
- java.lang.Object
-
- org.apache.flink.connector.file.table.DeserializationSchemaAdapter
-
- All Implemented Interfaces:
Serializable
,ResultTypeQueryable<RowData>
,BulkFormat<RowData,FileSourceSplit>
@Internal public class DeserializationSchemaAdapter extends Object implements BulkFormat<RowData,FileSourceSplit>
Adapter to turn aDeserializationSchema
into aBulkFormat
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.connector.file.src.reader.BulkFormat
BulkFormat.RecordIterator<T>
-
-
Constructor Summary
Constructors Constructor Description DeserializationSchemaAdapter(DeserializationSchema<RowData> deserializationSchema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.connector.file.table.DeserializationSchemaAdapter.Reader
createReader(Configuration config, FileSourceSplit split)
Creates a new reader that reads from thesplit's path
starting at thesplit's offset
and readslength
bytes after the offset.TypeInformation<RowData>
getProducedType()
Gets the type produced by this format.boolean
isSplittable()
Checks whether this format is splittable.org.apache.flink.connector.file.table.DeserializationSchemaAdapter.Reader
restoreReader(Configuration config, FileSourceSplit split)
Creates a new reader that reads fromsplit.path()
starting atoffset
and reads untillength
bytes after the offset.
-
-
-
Constructor Detail
-
DeserializationSchemaAdapter
public DeserializationSchemaAdapter(DeserializationSchema<RowData> deserializationSchema)
-
-
Method Detail
-
createReader
public org.apache.flink.connector.file.table.DeserializationSchemaAdapter.Reader createReader(Configuration config, FileSourceSplit split) throws IOException
Description copied from interface:BulkFormat
Creates a new reader that reads from thesplit's path
starting at thesplit's offset
and readslength
bytes after the offset.- Specified by:
createReader
in interfaceBulkFormat<RowData,FileSourceSplit>
- Throws:
IOException
-
restoreReader
public org.apache.flink.connector.file.table.DeserializationSchemaAdapter.Reader restoreReader(Configuration config, FileSourceSplit split) throws IOException
Description copied from interface:BulkFormat
Creates a new reader that reads fromsplit.path()
starting atoffset
and reads untillength
bytes after the offset. A number ofrecordsToSkip
records should be read and discarded after the offset. This is typically part of restoring a reader to a checkpointed position.- Specified by:
restoreReader
in interfaceBulkFormat<RowData,FileSourceSplit>
- Throws:
IOException
-
isSplittable
public boolean isSplittable()
Description copied from interface:BulkFormat
Checks whether this format is splittable. Splittable formats allow Flink to create multiple splits per file, so that Flink can read multiple regions of the file concurrently.See
top-level JavaDocs
(section "Splitting") for details.- Specified by:
isSplittable
in interfaceBulkFormat<RowData,FileSourceSplit>
-
getProducedType
public TypeInformation<RowData> getProducedType()
Description copied from interface:BulkFormat
Gets the type produced by this format. This type will be the type produced by the file source as a whole.- Specified by:
getProducedType
in interfaceBulkFormat<RowData,FileSourceSplit>
- Specified by:
getProducedType
in interfaceResultTypeQueryable<RowData>
- Returns:
- The data type produced by this function or input format.
-
-