Class AvroFormatModel<D,S>

java.lang.Object
org.apache.iceberg.formats.BaseFormatModel<D,S,org.apache.avro.io.DatumWriter<D>,org.apache.avro.io.DatumReader<D>,org.apache.avro.Schema>
org.apache.iceberg.avro.AvroFormatModel<D,S>
All Implemented Interfaces:
FormatModel<D,S>

public class AvroFormatModel<D,S> extends BaseFormatModel<D,S,org.apache.avro.io.DatumWriter<D>,org.apache.avro.io.DatumReader<D>,org.apache.avro.Schema>
  • Method Details

    • forPositionDeletes

      public static <D> AvroFormatModel<PositionDelete<D>,Void> forPositionDeletes()
    • create

      public static <D, S> AvroFormatModel<D,S> create(Class<D> type, Class<S> schemaType, BaseFormatModel.WriterFunction<org.apache.avro.io.DatumWriter<D>,S,org.apache.avro.Schema> writerFunction, BaseFormatModel.ReaderFunction<org.apache.avro.io.DatumReader<D>,S,org.apache.avro.Schema> readerFunction)
    • format

      public FileFormat format()
      Description copied from interface: FormatModel
      The file format which is read/written by the object model.
    • writeBuilder

      public ModelWriteBuilder<D,S> writeBuilder(EncryptedOutputFile outputFile)
      Description copied from interface: FormatModel
      Creates a writer builder for data files.

      The returned ModelWriteBuilder configures and creates a writer that converts input objects into the file format supported by this factory.

      Parameters:
      outputFile - destination for the written data
      Returns:
      configured writer builder
    • readBuilder

      public ReadBuilder<D,S> readBuilder(InputFile inputFile)
      Description copied from interface: FormatModel
      Creates a file reader builder for the specified input file.

      The returned ReadBuilder configures and creates a reader that converts data from the file format into output objects supported by this factory.

      Parameters:
      inputFile - source file to read from
      Returns:
      configured reader builder for the specified input