Class DeserializationSchemaAdapter

java.lang.Object
org.apache.flink.connector.file.table.DeserializationSchemaAdapter
All Implemented Interfaces:
Serializable, org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>, BulkFormat<org.apache.flink.table.data.RowData,FileSourceSplit>

@Internal public class DeserializationSchemaAdapter extends Object implements BulkFormat<org.apache.flink.table.data.RowData,FileSourceSplit>
Adapter to turn a DeserializationSchema into a BulkFormat.
See Also:
  • 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(org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData> deserializationSchema)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.connector.file.table.DeserializationSchemaAdapter.Reader
    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<org.apache.flink.table.data.RowData>
    Gets the type produced by this format.
    boolean
    Checks whether this format is splittable.
    org.apache.flink.connector.file.table.DeserializationSchemaAdapter.Reader
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DeserializationSchemaAdapter

      public DeserializationSchemaAdapter(org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData> deserializationSchema)
  • Method Details

    • createReader

      public org.apache.flink.connector.file.table.DeserializationSchemaAdapter.Reader createReader(org.apache.flink.configuration.Configuration config, FileSourceSplit split) throws IOException
      Description copied from interface: BulkFormat
      Creates a new reader that reads from the split's path starting at the split's offset and reads length bytes after the offset.
      Specified by:
      createReader in interface BulkFormat<org.apache.flink.table.data.RowData,FileSourceSplit>
      Throws:
      IOException
    • restoreReader

      public org.apache.flink.connector.file.table.DeserializationSchemaAdapter.Reader restoreReader(org.apache.flink.configuration.Configuration config, FileSourceSplit split) throws IOException
      Description copied from interface: BulkFormat
      Creates a new reader that reads from 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.
      Specified by:
      restoreReader in interface BulkFormat<org.apache.flink.table.data.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 interface BulkFormat<org.apache.flink.table.data.RowData,FileSourceSplit>
    • getProducedType

      public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.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 interface BulkFormat<org.apache.flink.table.data.RowData,FileSourceSplit>
      Specified by:
      getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>