Class PbFileFormatFactory

  • All Implemented Interfaces:
    org.apache.flink.connector.file.table.factories.BulkReaderFormatFactory, org.apache.flink.connector.file.table.factories.BulkWriterFormatFactory, org.apache.flink.table.factories.DecodingFormatFactory<org.apache.flink.connector.file.src.reader.BulkFormat<org.apache.flink.table.data.RowData,​org.apache.flink.connector.file.src.FileSourceSplit>>, org.apache.flink.table.factories.EncodingFormatFactory<org.apache.flink.api.common.serialization.BulkWriter.Factory<org.apache.flink.table.data.RowData>>, org.apache.flink.table.factories.Factory, org.apache.flink.table.factories.FormatFactory

    @Internal
    public class PbFileFormatFactory
    extends Object
    implements org.apache.flink.connector.file.table.factories.BulkReaderFormatFactory, org.apache.flink.connector.file.table.factories.BulkWriterFormatFactory
    Throw a ValidationException when using Protobuf format factory for file system.

    In practice, there is no standard for storing bulk protobuf messages. This factory is present to prevent falling back to the DeserializationSchemaAdapter, a line-based format which could silently succeed but write unrecoverable data to disk.

    If your use case requires storing bulk protobuf messages on disk, the parquet file format might be the appropriate container and has an API for mapping records to protobuf messages.

    • Constructor Detail

      • PbFileFormatFactory

        public PbFileFormatFactory()
    • Method Detail

      • factoryIdentifier

        public String factoryIdentifier()
        Specified by:
        factoryIdentifier in interface org.apache.flink.table.factories.Factory
      • requiredOptions

        public Set<org.apache.flink.configuration.ConfigOption<?>> requiredOptions()
        Specified by:
        requiredOptions in interface org.apache.flink.table.factories.Factory
      • optionalOptions

        public Set<org.apache.flink.configuration.ConfigOption<?>> optionalOptions()
        Specified by:
        optionalOptions in interface org.apache.flink.table.factories.Factory
      • forwardOptions

        public Set<org.apache.flink.configuration.ConfigOption<?>> forwardOptions()
        Specified by:
        forwardOptions in interface org.apache.flink.table.factories.FormatFactory
      • createDecodingFormat

        public org.apache.flink.connector.file.table.format.BulkDecodingFormat<org.apache.flink.table.data.RowData> createDecodingFormat​(org.apache.flink.table.factories.DynamicTableFactory.Context context,
                                                                                                                                         org.apache.flink.configuration.ReadableConfig formatOptions)
        Specified by:
        createDecodingFormat in interface org.apache.flink.connector.file.table.factories.BulkReaderFormatFactory
        Specified by:
        createDecodingFormat in interface org.apache.flink.table.factories.DecodingFormatFactory<org.apache.flink.connector.file.src.reader.BulkFormat<org.apache.flink.table.data.RowData,​org.apache.flink.connector.file.src.FileSourceSplit>>
      • createEncodingFormat

        public org.apache.flink.table.connector.format.EncodingFormat<org.apache.flink.api.common.serialization.BulkWriter.Factory<org.apache.flink.table.data.RowData>> createEncodingFormat​(org.apache.flink.table.factories.DynamicTableFactory.Context context,
                                                                                                                                                                                              org.apache.flink.configuration.ReadableConfig formatOptions)
        Specified by:
        createEncodingFormat in interface org.apache.flink.table.factories.EncodingFormatFactory<org.apache.flink.api.common.serialization.BulkWriter.Factory<org.apache.flink.table.data.RowData>>